diff options
author | M. Ángel Jimeno <jimen0@users.noreply.github.com> | 2021-08-18 20:58:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-18 12:58:19 -0600 |
commit | 9e333c39da785075e14d2a75887439f1887356d5 (patch) | |
tree | aa793aadbfcfaf04de78efe3fef48ec089fecb27 /cmd | |
parent | 8a974a4f8f1628c0b74c3a19cb8f2d0b48123cca (diff) |
cmd: use net.ErrClosed for matching returned error (#4289)
Implements #3805
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/commandfuncs.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/commandfuncs.go b/cmd/commandfuncs.go index c70b57a..c456a81 100644 --- a/cmd/commandfuncs.go +++ b/cmd/commandfuncs.go @@ -19,6 +19,7 @@ import ( "context" "crypto/rand" "encoding/json" + "errors" "fmt" "io" "io/ioutil" @@ -119,7 +120,7 @@ func cmdStart(fl Flags) (int, error) { for { conn, err := ln.Accept() if err != nil { - if !strings.Contains(err.Error(), "use of closed network connection") { + if !errors.Is(err, net.ErrClosed) { log.Println(err) } break |