Skip to content

Commit

Permalink
cancel the idle timeout when the socket is closed in the server code
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelBender committed May 12, 2017
1 parent 5698bc9 commit fe08d71
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions py27/bacpypes/tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,12 @@ def handle_close(self):
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)

Expand Down
6 changes: 6 additions & 0 deletions py34/bacpypes/tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,12 @@ def handle_close(self):
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)

Expand Down

0 comments on commit fe08d71

Please sign in to comment.