1
0
mirror of https://github.com/JoelBender/bacpypes synced 2025-09-28 22:15:23 +08:00

cancel the idle timeout when the socket is closed in the server code

This commit is contained in:
Joel Bender 2017-05-11 23:44:40 -04:00
parent 5698bc907f
commit fe08d71650
2 changed files with 12 additions and 0 deletions

View File

@ -692,6 +692,12 @@ class TCPServerActor(TCPServer):
if self.flush_task:
self.flush_task.suspend_task()
# if there is an idle timeout, cancel it
if self.idle_timeout_task:
if _debug: TCPServerActor._debug(" - canceling idle timeout")
self.idle_timeout_task.suspend_task()
self.idle_timeout_task = None
# tell the director this is gone
self.director.del_actor(self)

View File

@ -692,6 +692,12 @@ class TCPServerActor(TCPServer):
if self.flush_task:
self.flush_task.suspend_task()
# if there is an idle timeout, cancel it
if self.idle_timeout_task:
if _debug: TCPServerActor._debug(" - canceling idle timeout")
self.idle_timeout_task.suspend_task()
self.idle_timeout_task = None
# tell the director this is gone
self.director.del_actor(self)