ctlsock: don't Warn() on closed socket
This Warn() is causing panics in the test suite on MacOS: https://github.com/rfjakob/gocryptfs/issues/213
This commit is contained in:
parent
5fcfd30ddc
commit
db45f27671
@ -60,10 +60,10 @@ func (ch *ctlSockHandler) acceptLoop() {
|
|||||||
for {
|
for {
|
||||||
conn, err := ch.socket.Accept()
|
conn, err := ch.socket.Accept()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// TODO Can this warning trigger when the socket it closed on
|
// This can trigger on program exit with "use of closed network connection".
|
||||||
// program exit? I have never observed it, but the documentation
|
// Special-casing this is hard due to https://github.com/golang/go/issues/4373
|
||||||
// says that Close() unblocks Accept().
|
// so just don't use tlog.Warn to not cause panics in the tests.
|
||||||
tlog.Warn.Printf("ctlsock: Accept error: %v", err)
|
tlog.Info.Printf("ctlsock: Accept error: %v", err)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
go ch.handleConnection(conn.(*net.UnixConn))
|
go ch.handleConnection(conn.(*net.UnixConn))
|
||||||
|
Loading…
Reference in New Issue
Block a user