]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Don't return if there's an error accepting
authorMatt Joiner <anacrolix@gmail.com>
Sun, 22 Jul 2018 02:58:41 +0000 (12:58 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Sun, 22 Jul 2018 02:58:41 +0000 (12:58 +1000)
This happens if there's too many file descriptors, and left the client unresponsive.

client.go

index c4278582ac7dcadf9b857060d9eedf68189a0976..ec388ceacb9c605c074af17756741e5c4ecba271 100644 (file)
--- a/client.go
+++ b/client.go
@@ -389,10 +389,7 @@ func (cl *Client) acceptConnections(l net.Listener) {
                        return
                }
                if err != nil {
-                       log.Print(err)
-                       // I think something harsher should happen here? Our accept
-                       // routine just fucked off.
-                       return
+                       log.Printf("error accepting connection: %s", err)
                }
                go func() {
                        if reject {