Unref open connections in the listener loops to let gc collect when closed
This commit is contained in:
parent
2193a972ee
commit
c0cbac214e
|
@ -49,6 +49,7 @@ class I2PListener(I2PThread):
|
||||||
destination, 'i2p', self.s, 'i2p', True, destination)
|
destination, 'i2p', self.s, 'i2p', True, destination)
|
||||||
c.start()
|
c.start()
|
||||||
self.state.connections.add(c)
|
self.state.connections.add(c)
|
||||||
|
c = None
|
||||||
self.new_socket()
|
self.new_socket()
|
||||||
except socket.timeout:
|
except socket.timeout:
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -39,3 +39,4 @@ class Listener(threading.Thread):
|
||||||
c = Connection(*addr[:2], conn, server=True)
|
c = Connection(*addr[:2], conn, server=True)
|
||||||
c.start()
|
c.start()
|
||||||
shared.connections.add(c)
|
shared.connections.add(c)
|
||||||
|
c = None
|
||||||
|
|
Loading…
Reference in New Issue
Block a user