no need to select; it's a one shot sync

This commit is contained in:
vyzo 2018-05-07 12:03:21 +03:00
parent 8af7aacd7a
commit ea2e287572
1 changed files with 2 additions and 4 deletions

View File

@ -145,10 +145,8 @@ func (as *AutoNATService) doDial(pi pstore.PeerInfo) *pb.Message_DialResponse {
log.Debugf("error dialing %s: %s", pi.ID.Pretty(), err.Error())
// wait for the context to timeout to avoid leaking timing information
// this renders the service ineffective as a port scanner
select {
case <-ctx.Done():
return newDialResponseError(pb.Message_E_DIAL_ERROR, "dial failed")
}
<-ctx.Done()
return newDialResponseError(pb.Message_E_DIAL_ERROR, "dial failed")
}
conns := as.dialer.Network().ConnsToPeer(pi.ID)