mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Change the channel size of peer queue
Back to `0`, to avoid unlimited buffer size.
This commit is contained in:
@ -96,8 +96,8 @@ class Pubsub(Service, IPubsub):
|
||||
# Attach this new Pubsub object to the router
|
||||
self.router.attach(self)
|
||||
|
||||
peer_send, peer_receive = trio.open_memory_channel[ID](math.inf)
|
||||
dead_peer_send, dead_peer_receive = trio.open_memory_channel[ID](math.inf)
|
||||
peer_send, peer_receive = trio.open_memory_channel[ID](0)
|
||||
dead_peer_send, dead_peer_receive = trio.open_memory_channel[ID](0)
|
||||
# Only keep the receive channels in `Pubsub`.
|
||||
# Therefore, we can only close from the receive side.
|
||||
self.peer_receive_channel = peer_receive
|
||||
|
||||
Reference in New Issue
Block a user