[Box Backup-commit] COMMIT r2451 - box/trunk/lib/server

boxbackup-dev at boxbackup.org boxbackup-dev at boxbackup.org
Sun Mar 15 20:20:37 GMT 2009


Author: chris
Date: 2009-03-15 20:20:37 +0000 (Sun, 15 Mar 2009)
New Revision: 2451

Modified:
   box/trunk/lib/server/SocketStream.cpp
Log:
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.


Modified: box/trunk/lib/server/SocketStream.cpp
===================================================================
--- box/trunk/lib/server/SocketStream.cpp	2009-03-15 10:19:53 UTC (rev 2450)
+++ box/trunk/lib/server/SocketStream.cpp	2009-03-15 20:20:37 UTC (rev 2451)
@@ -368,7 +368,8 @@
 #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;
 }




More information about the Boxbackup-commit mailing list