Shut downn closed sockets - makes status detectabke at the other end.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 27 Aug 2012 02:22:14 +0000 (22:22 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 27 Aug 2012 02:22:14 +0000 (22:22 -0400)
irclib.py

index caa5066210ca0662ab1ceaf005da981148155f83..724355c1ec621d8ef73c99fd14f29e56ea2219d3 100644 (file)
--- a/irclib.py
+++ b/irclib.py
@@ -728,6 +728,7 @@ class ServerConnection(Connection):
         self.quit(message)
 
         try:
+            self.socket.shutdown()
             self.socket.close()
         except socket.error:
             pass
@@ -1001,6 +1002,7 @@ class DCCConnection(Connection):
 
         self.connected = 0
         try:
+            self.socket.shutdown()
             self.socket.close()
         except socket.error:
             pass