Avoid using flume::Receiver::into_stream() to avoid memory leaks until the issue is resolved upstream (#394)

* Tweak rolling_total test to also confirm capacity doesn't go nuts

* Use Jemalloc

* Avoid flume's into_stream and use a workaround for now

* cargo fmt

* Improve comments now that there's an issue to point to
This commit is contained in:
James Wilson
2021-09-03 08:40:43 +01:00
committed by GitHub
parent a4069e4b3d
commit 2932075783
10 changed files with 80 additions and 7 deletions
+1 -1
View File
@@ -205,7 +205,7 @@ impl Connection {
closer: Arc::clone(&on_close),
},
Receiver {
inner: rx_from_ws.into_stream(),
inner: crate::flume_receiver_into_stream(rx_from_ws),
closer: on_close,
},
)
+1 -1
View File
@@ -20,7 +20,7 @@ use std::sync::Arc;
/// Receive messages out of a connection
pub struct Receiver {
pub(super) inner: flume::r#async::RecvStream<'static, Result<RecvMessage, RecvError>>,
pub(super) inner: crate::FlumeRecvStream<'static, Result<RecvMessage, RecvError>>,
pub(super) closer: Arc<OnClose>,
}