# HG changeset patch # Parent a317086a3e19037a2b0c8332b7cb8c411aab390d diff -r a317086a3e19 src/base/socket.cc --- a/src/base/socket.cc Thu Sep 05 13:53:54 2013 -0400 +++ b/src/base/socket.cc Thu Sep 05 15:30:29 2013 -0500 @@ -103,11 +103,14 @@ return false; } - if (::listen(fd, 1) == -1) - panic("ListenSocket(listen): listen() failed!"); + if (::listen(fd, 1) == -1) { + if (errno != EADDRINUSE) + panic("ListenSocket(listen): listen() failed!"); + + return false; + } listening = true; - anyListening = true; return true; }