File tree Expand file tree Collapse file tree 1 file changed +0
-4
lines changed Expand file tree Collapse file tree 1 file changed +0
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package godisson
2
2
3
3
import (
4
4
"context"
5
- "fmt"
6
5
"github.com/pkg/errors"
7
6
"net"
8
7
"time"
@@ -41,7 +40,6 @@ func (m *Mutex) TryLock(waitTime int64, leaseTime int64) error {
41
40
timeoutCtx , timeoutCancel := context .WithTimeout (context .TODO (), time .Duration (wait )* time .Millisecond )
42
41
defer timeoutCancel ()
43
42
_ , err = sub .ReceiveMessage (timeoutCtx )
44
- fmt .Println ("receive" , 1 )
45
43
if err != nil {
46
44
return ErrLockNotObtained
47
45
}
@@ -72,7 +70,6 @@ func (m *Mutex) TryLock(waitTime int64, leaseTime int64) error {
72
70
continue
73
71
}
74
72
}
75
- fmt .Println ("receive" , 2 )
76
73
} else {
77
74
tCtx , _ := context .WithTimeout (context .TODO (), time .Duration (wait )* time .Millisecond )
78
75
_ , err := sub .ReceiveMessage (tCtx )
@@ -82,7 +79,6 @@ func (m *Mutex) TryLock(waitTime int64, leaseTime int64) error {
82
79
continue
83
80
}
84
81
}
85
- fmt .Println ("receive" , 3 )
86
82
}
87
83
wait -= currentTimeMillis () - currentTime
88
84
if wait <= 0 {
You can’t perform that action at this time.
0 commit comments