This commit is contained in:
Kevin Hester
2021-03-31 16:27:49 +08:00
parent b812a61bd5
commit ea6a61a701
2 changed files with 9 additions and 3 deletions

View File

@@ -1291,7 +1291,10 @@ class TCPInterface(StreamInterface):
# the socket here
self._wantExit = True
if not self.socket is None:
self.socket.shutdown(socket.SHUT_RDWR)
try:
self.socket.shutdown(socket.SHUT_RDWR)
except:
pass # Ignore errors in shutdown, because we might have a race with the server
self.socket.close()
def _writeBytes(self, b):
@@ -3418,7 +3421,10 @@ hostname {string} &ndash; Hostname/IP address of the device to connect to</p></d
# the socket here
self._wantExit = True
if not self.socket is None:
self.socket.shutdown(socket.SHUT_RDWR)
try:
self.socket.shutdown(socket.SHUT_RDWR)
except:
pass # Ignore errors in shutdown, because we might have a race with the server
self.socket.close()
def _writeBytes(self, b):

View File

@@ -12,7 +12,7 @@ with open("README.md", "r") as fh:
# This call to setup() does all the work
setup(
name="meshtastic",
version="1.2.17",
version="1.2.18",
description="Python API & client shell for talking to Meshtastic devices",
long_description=long_description,
long_description_content_type="text/markdown",