Permalink
Browse files

Added explicit socket shutdown prior to close.

git-svn-id: http://ibpy.googlecode.com/svn/trunk@292 3e6b72d3-b629-0410-ad1b-3b4ab856adc4
  • Loading branch information...
1 parent af1e183 commit cb83042c86724988d7fb2ce49a6736aee54727c6 troy.melhase committed Feb 5, 2008
Showing with 4 additions and 0 deletions.
  1. +1 −0 ib/ext/EClientSocket.py
  2. +3 −0 ib/ext/cfg/EClientSocket.py
@@ -163,6 +163,7 @@ def eDisconnect(self):
if self.m_reader is not None:
self.m_reader.interrupt()
if self.m_socket is not None:
+ self.m_socket.shutdown(self.m_socket.SHUT_RDWR)
self.m_socket.close()
except (Exception, ), e:
pass
@@ -27,6 +27,9 @@
(r' m_dos = DataOutputStream\(\)', r' m_dos = None'),
(r'(, "" \+ e)', r', str(e)'),
+ (r'(\s+)(self.m_socket.close\(\))',
+ r'\1self.m_socket.shutdown(self.m_socket.SHUT_RDWR)\1\2'),
+
(r'print "Server Version:" \+ self\.m_serverVersion',
r'debug("Server Version: %s", self.m_serverVersion)',),

0 comments on commit cb83042

Please sign in to comment.