From d929e0deb2ecc6a4b4da7136cba00cb7492573b7 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Thu, 25 Aug 2011 13:48:43 -0700 Subject: Shutdown socket before closing. --- sleekxmpp/xmlstream/xmlstream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 405f76d3..3ce278f0 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -485,9 +485,9 @@ class XMLStream(object): if not self.auto_reconnect: self.stop.set() try: + self.socket.shutdown(Socket.SHUT_RDWR) self.socket.close() self.filesocket.close() - self.socket.shutdown(Socket.SHUT_RDWR) except Socket.error as serr: self.event('socket_error', serr) finally: -- cgit v1.2.3