summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py2
1 files changed, 1 insertions, 1 deletions
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: