Skip to content

Commit 3a07f85

Browse files
author
hekangning
committed
delete log
1 parent a8551d3 commit 3a07f85

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

mutex.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package godisson
22

33
import (
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 {

0 commit comments

Comments
 (0)