all: Use context in lib/dialer (#6177)
* all: Use context in lib/dialer * a bit slimmer * https://github.com/syncthing/syncthing/pull/5753 * bot * missed adding debug.go * errors.Cause * simultaneous dialing * anti-leak
This commit is contained in:
committed by
Audrius Butkevicius
parent
4e151d380c
commit
1bae4b7f50
@@ -236,6 +236,9 @@ func (s *service) Serve() {
|
||||
|
||||
var err error
|
||||
defer func() {
|
||||
if err == context.Canceled {
|
||||
err = nil
|
||||
}
|
||||
s.mut.Lock()
|
||||
s.err = err
|
||||
close(s.stopped)
|
||||
|
||||
Reference in New Issue
Block a user