Mplex: change new stream channel size

To `0`, i.e. no unbuffered, to avoid growing buffer size.
pull/365/head
mhchia 2020-02-05 19:48:02 +08:00
parent 1e7d5c73ee
commit 64c9c48dac
No known key found for this signature in database
GPG Key ID: 389EFBEA1362589A
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class Mplex(IMuxedConn):
self.streams = {}
self.streams_lock = trio.Lock()
self.streams_msg_channels = {}
channels = trio.open_memory_channel[IMuxedStream](math.inf)
channels = trio.open_memory_channel[IMuxedStream](0)
self.new_stream_send_channel, self.new_stream_receive_channel = channels
self.event_shutting_down = trio.Event()
self.event_closed = trio.Event()