Skip to content

Commit

Permalink
Ignores errNetClosing error
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciro S. Costa committed Aug 12, 2017
1 parent bfe82ab commit 860f8fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/dumb_tcp_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"io"
"net"
"strings"
"testing"
"time"

Expand Down Expand Up @@ -42,6 +43,9 @@ func (s *DumbTcpServer) Listen() (err error) {
for {
conn, err := ln.Accept()
if err != nil {
if strings.Contains(err.Error(), "use of closed network connection") {
continue
}
fmt.Printf("listen errored: %+v\n", err)
continue
}
Expand Down

0 comments on commit 860f8fc

Please sign in to comment.