diff -r befedd5c64c5 Lib/logging/handlers.py --- a/Lib/logging/handlers.py Sun Oct 06 09:53:11 2013 +0200 +++ b/Lib/logging/handlers.py Sun Oct 06 16:10:54 2013 +0300 @@ -518,7 +518,11 @@ else: result = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) result.settimeout(timeout) - result.connect(self.address) + try: + result.connect(self.address) + except OSError: + result.close() + raise return result def createSocket(self):