summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2009-03-15 20:20:37 +0000
committerChris Wilson <chris+github@qwirx.com>2009-03-15 20:20:37 +0000
commit8daccb301b174beaa9d39d9a0173399ea6c94fb5 (patch)
tree2a36b487317733e7464a8eb227d1468b7bd8622a
parent52998032d87f5b07da45fad16e9b929f3241c16a (diff)
Fix crash when freebsd (maybe *bsd) returns ECONNRESET on close(), which
presumably means that the socket is already closed, causing bbackupd test to fail. Thanks to Victor Meirans for reporting the problem. See http://wiki.powerdns.com/cgi-bin/trac.fcgi/changeset/1280 and http://wiki.powerdns.com/cgi-bin/trac.fcgi/ticket/192 for example.
-rw-r--r--lib/server/SocketStream.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/server/SocketStream.cpp b/lib/server/SocketStream.cpp
index d4a531ac..95b4b4f4 100644
--- a/lib/server/SocketStream.cpp
+++ b/lib/server/SocketStream.cpp
@@ -368,7 +368,8 @@ void SocketStream::Close()
#endif
{
BOX_LOG_SYS_ERROR("Failed to close socket");
- THROW_EXCEPTION(ServerException, SocketCloseError)
+ // don't throw an exception here, assume that the socket was
+ // already closed or closing.
}
mSocketHandle = INVALID_SOCKET_VALUE;
}