Commit 1c07b91c authored by Steven Allen's avatar Steven Allen

remove unused success boolean

parent f31d6fbf
...@@ -18,11 +18,10 @@ type dialResult struct { ...@@ -18,11 +18,10 @@ type dialResult struct {
} }
type dialJob struct { type dialJob struct {
addr ma.Multiaddr addr ma.Multiaddr
peer peer.ID peer peer.ID
ctx context.Context ctx context.Context
resp chan dialResult resp chan dialResult
success bool
} }
func (dj *dialJob) cancelled() bool { func (dj *dialJob) cancelled() bool {
...@@ -100,7 +99,7 @@ func (dl *dialLimiter) freePeerToken(dj *dialJob) { ...@@ -100,7 +99,7 @@ func (dl *dialLimiter) freePeerToken(dj *dialJob) {
} }
waitlist := dl.waitingOnPeerLimit[dj.peer] waitlist := dl.waitingOnPeerLimit[dj.peer]
if !dj.success && len(waitlist) > 0 { if len(waitlist) > 0 {
next := waitlist[0] next := waitlist[0]
if len(waitlist) == 1 { if len(waitlist) == 1 {
delete(dl.waitingOnPeerLimit, next.peer) delete(dl.waitingOnPeerLimit, next.peer)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment