Skip to content

Commit

Permalink
swarm: remove unused variable in addrDial (#2257)
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt authored Apr 20, 2023
1 parent e4f1e0c commit f7a45b6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions p2p/net/swarm/dial_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ type addrDial struct {
conn *Conn
err error
requests []int
dialed bool
}

type dialWorker struct {
Expand Down Expand Up @@ -155,11 +154,9 @@ loop:
w.requests[w.reqno] = pr

for _, ad := range tojoin {
if !ad.dialed {
if simConnect, isClient, reason := network.GetSimultaneousConnect(req.ctx); simConnect {
if simConnect, _, _ := network.GetSimultaneousConnect(ad.ctx); !simConnect {
ad.ctx = network.WithSimultaneousConnect(ad.ctx, isClient, reason)
}
if simConnect, isClient, reason := network.GetSimultaneousConnect(req.ctx); simConnect {
if simConnect, _, _ := network.GetSimultaneousConnect(ad.ctx); !simConnect {
ad.ctx = network.WithSimultaneousConnect(ad.ctx, isClient, reason)
}
}
ad.requests = append(ad.requests, w.reqno)
Expand Down

0 comments on commit f7a45b6

Please sign in to comment.