mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-26 13:43:47 +03:00
cmd: use net.ErrClosed for matching returned error (#4289)
Implements #3805
This commit is contained in:
parent
8a974a4f8f
commit
9e333c39da
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue