Skip to content

Commit

Permalink
check for no more clients for del_actor, not every indication
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Bender committed Apr 27, 2017
1 parent 91925d0 commit cced04d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions samples/TCPClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ def indication(self, add_actor=None, del_actor=None, actor_error=None, error=Non
if del_actor:
if _debug: MiddleManASE._debug("indication del_actor=%r", del_actor)

# if there are no clients, quit
if not self.elementService.clients:
if _debug: MiddleManASE._debug(" - no clients, stopping")
stop()

if actor_error:
if _debug: MiddleManASE._debug("indication actor_error=%r error=%r", actor_error, error)
# tell the director to close
self.elementService.disconnect(actor_error.peer)

# if there are no clients, quit
if not self.elementService.clients:
if _debug: MiddleManASE._debug(" - no clients, stopping")
stop()

bacpypes_debugging(MiddleManASE)

#
Expand Down

0 comments on commit cced04d

Please sign in to comment.