mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 19:08:58 +00:00
lib/connections: Use proper errors.Is check (#9538)
This commit is contained in:
parent
7b1b77e50d
commit
f2d6722348
@ -12,6 +12,7 @@ package connections
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
"errors"
|
||||||
"net"
|
"net"
|
||||||
"net/url"
|
"net/url"
|
||||||
"sync"
|
"sync"
|
||||||
@ -145,7 +146,7 @@ func (t *quicListener) serve(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
session, err := listener.Accept(ctx)
|
session, err := listener.Accept(ctx)
|
||||||
if err == context.Canceled {
|
if errors.Is(err, context.Canceled) {
|
||||||
return nil
|
return nil
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
l.Infoln("Listen (BEP/quic): Accepting connection:", err)
|
l.Infoln("Listen (BEP/quic): Accepting connection:", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user