Support closing all current connection in ConnectionServer
This commit is contained in:
parent
498fd4bf01
commit
b8879853d5
1 changed files with 5 additions and 0 deletions
|
@ -113,6 +113,11 @@ class ConnectionServer(object):
|
||||||
if self.stream_server:
|
if self.stream_server:
|
||||||
self.stream_server.stop()
|
self.stream_server.stop()
|
||||||
|
|
||||||
|
def closeConnections(self):
|
||||||
|
self.log.debug("Closing all connection: %s" % len(self.connections))
|
||||||
|
for connection in self.connections[:]:
|
||||||
|
connection.close("Close all connections")
|
||||||
|
|
||||||
def handleIncomingConnection(self, sock, addr):
|
def handleIncomingConnection(self, sock, addr):
|
||||||
ip, port = addr[0:2]
|
ip, port = addr[0:2]
|
||||||
ip = ip.lower()
|
ip = ip.lower()
|
||||||
|
|
Loading…
Reference in a new issue