Change the channel size of peer queue

Back to `0`, to avoid unlimited buffer size.
pull/365/head
mhchia 2020-01-31 17:42:47 +08:00
parent e57d01f360
commit 1588be2be9
No known key found for this signature in database
GPG Key ID: 389EFBEA1362589A
1 changed files with 2 additions and 2 deletions

View File

@ -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