mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-21 08:31:52 +03:00
GC connections in wallet (#10450)
This commit is contained in:
parent
d245790a17
commit
e8475fb194
@ -208,7 +208,9 @@ class ChiaServer:
|
||||
await asyncio.sleep(600 if is_crawler is None else 2)
|
||||
to_remove: List[WSChiaConnection] = []
|
||||
for connection in self.all_connections.values():
|
||||
if self._local_type == NodeType.FULL_NODE and connection.connection_type == NodeType.FULL_NODE:
|
||||
if (
|
||||
self._local_type == NodeType.FULL_NODE or self._local_type == NodeType.WALLET
|
||||
) and connection.connection_type == NodeType.FULL_NODE:
|
||||
if is_crawler is not None:
|
||||
if time.time() - connection.creation_time > 5:
|
||||
to_remove.append(connection)
|
||||
|
Loading…
Reference in New Issue
Block a user