mirror of
https://github.com/JoelBender/bacpypes
synced 2025-09-28 22:15:23 +08:00
shuffle the close
This commit is contained in:
parent
c879b7a8e6
commit
236375e3b4
|
@ -113,10 +113,8 @@ class UDPMultiplexer:
|
|||
|
||||
# pass along the close to the director(s)
|
||||
self.directPort.close_socket()
|
||||
self.directPort.close()
|
||||
if self.broadcastPort:
|
||||
self.broadcastPort.close_socket()
|
||||
self.broadcastPort.close()
|
||||
|
||||
def indication(self, server, pdu):
|
||||
if _debug: UDPMultiplexer._debug("indication %r %r", server, pdu)
|
||||
|
|
|
@ -253,6 +253,8 @@ class UDPDirector(asyncore.dispatcher, Server, ServiceAccessPoint):
|
|||
if _debug: UDPDirector._debug("close_socket")
|
||||
|
||||
self.socket.close()
|
||||
self.close()
|
||||
self.socket = None
|
||||
|
||||
def handle_close(self):
|
||||
"""Remove this from the monitor when it's closed."""
|
||||
|
|
|
@ -114,10 +114,8 @@ class UDPMultiplexer:
|
|||
|
||||
# pass along the close to the director(s)
|
||||
self.directPort.close_socket()
|
||||
self.directPort.close()
|
||||
if self.broadcastPort:
|
||||
self.broadcastPort.close_socket()
|
||||
self.broadcastPort.close()
|
||||
|
||||
def indication(self, server, pdu):
|
||||
if _debug: UDPMultiplexer._debug("indication %r %r", server, pdu)
|
||||
|
|
|
@ -252,6 +252,8 @@ class UDPDirector(asyncore.dispatcher, Server, ServiceAccessPoint):
|
|||
if _debug: UDPDirector._debug("close_socket")
|
||||
|
||||
self.socket.close()
|
||||
self.close()
|
||||
self.socket = None
|
||||
|
||||
def handle_close(self):
|
||||
"""Remove this from the monitor when it's closed."""
|
||||
|
|
|
@ -114,10 +114,8 @@ class UDPMultiplexer:
|
|||
|
||||
# pass along the close to the director(s)
|
||||
self.directPort.close_socket()
|
||||
self.directPort.close()
|
||||
if self.broadcastPort:
|
||||
self.broadcastPort.close_socket()
|
||||
self.broadcastPort.close()
|
||||
|
||||
def indication(self, server, pdu):
|
||||
if _debug: UDPMultiplexer._debug("indication %r %r", server, pdu)
|
||||
|
|
|
@ -252,6 +252,8 @@ class UDPDirector(asyncore.dispatcher, Server, ServiceAccessPoint):
|
|||
if _debug: UDPDirector._debug("close_socket")
|
||||
|
||||
self.socket.close()
|
||||
self.close()
|
||||
self.socket = None
|
||||
|
||||
def handle_close(self):
|
||||
"""Remove this from the monitor when it's closed."""
|
||||
|
|
Loading…
Reference in New Issue
Block a user