diff --git a/TWS/twsproxy/__init__.py b/TWS/twsproxy/__init__.py index 55bbc8ba1988a603cac8148776304c5e7153f187..f84e09aaa354e131c2262aa564ec7d93c02c365a 100644 --- a/TWS/twsproxy/__init__.py +++ b/TWS/twsproxy/__init__.py @@ -206,16 +206,10 @@ class TWSProxy(threading.Thread): if msglength > 0: TWSProxy.reliablesend(dest,buff,msglength) if msglength == 0: - """ - see https://manpages.debian.org/buster/manpages-dev/recv.2.en.html - in particular - Datagram sockets in various domains (e.g., the UNIX and Internet domains) permit zero-length datagrams. When such a datagram is received, the return value is 0. - """ - logger.debug('msglength 0, sending 0 {} {}'.format(src,dest)) - dest.send(buff) - #dest.shutdown(shuttype) - #initshutdown.set() - #closed = True + logger.debug('msglength 0, closing {} {}'.format(src,dest)) + dest.shutdown(shuttype) + initshutdown.set() + closed = True logger.debug('ending sock copy {} {}'.format(src,dest)) dest.shutdown(shuttype)