File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package godisson
22
33import (
44 "context"
5- "fmt"
65 "github.com/pkg/errors"
76 "net"
87 "time"
@@ -41,7 +40,6 @@ func (m *Mutex) TryLock(waitTime int64, leaseTime int64) error {
4140 timeoutCtx , timeoutCancel := context .WithTimeout (context .TODO (), time .Duration (wait )* time .Millisecond )
4241 defer timeoutCancel ()
4342 _ , err = sub .ReceiveMessage (timeoutCtx )
44- fmt .Println ("receive" , 1 )
4543 if err != nil {
4644 return ErrLockNotObtained
4745 }
@@ -72,7 +70,6 @@ func (m *Mutex) TryLock(waitTime int64, leaseTime int64) error {
7270 continue
7371 }
7472 }
75- fmt .Println ("receive" , 2 )
7673 } else {
7774 tCtx , _ := context .WithTimeout (context .TODO (), time .Duration (wait )* time .Millisecond )
7875 _ , err := sub .ReceiveMessage (tCtx )
@@ -82,7 +79,6 @@ func (m *Mutex) TryLock(waitTime int64, leaseTime int64) error {
8279 continue
8380 }
8481 }
85- fmt .Println ("receive" , 3 )
8682 }
8783 wait -= currentTimeMillis () - currentTime
8884 if wait <= 0 {
You can’t perform that action at this time.
0 commit comments