Skip to content

Commit 7489592

Browse files
committed
close3.
1 parent d4f1cd9 commit 7489592

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pymodbus/client/base.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,8 @@ def connection_lost(self, reason):
208208
209209
The argument is either an exception object or None
210210
"""
211-
if self.transport:
212-
self.transport.abort()
213-
if hasattr(self.transport, "_sock"):
214-
self.transport._sock.close() # pylint: disable=protected-access
215-
self.transport = None
216-
self.close(reconnect=True)
217-
218211
Log.debug("Client disconnected from modbus server: {}", reason)
212+
self.close(reconnect=True)
219213
for tid in list(self.transaction):
220214
self.raise_future(
221215
self.transaction.getTransaction(tid),

0 commit comments

Comments
 (0)