mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +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
|
# Attach this new Pubsub object to the router
|
||||||
self.router.attach(self)
|
self.router.attach(self)
|
||||||
|
|
||||||
peer_send, 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](math.inf)
|
dead_peer_send, dead_peer_receive = trio.open_memory_channel[ID](0)
|
||||||
# Only keep the receive channels in `Pubsub`.
|
# Only keep the receive channels in `Pubsub`.
|
||||||
# Therefore, we can only close from the receive side.
|
# Therefore, we can only close from the receive side.
|
||||||
self.peer_receive_channel = peer_receive
|
self.peer_receive_channel = peer_receive
|
||||||
|
|||||||
Reference in New Issue
Block a user