Make errors on listener non-fatal (#1427)

* Make errors on listener non-fatal

* Fix bad rename

* Some changes to trait bounds

* Fix noise tests

* Apply suggestions from code review

Co-Authored-By: Toralf Wittner <tw@dtex.org>

* Add reason for closure

* Fix intra-doc link

Co-authored-by: Toralf Wittner <tw@dtex.org>
This commit is contained in:
Pierre Krieger
2020-02-13 12:05:45 +01:00
committed by GitHub
parent e2ddab223d
commit bbed28b3ec
20 changed files with 246 additions and 87 deletions

View File

@ -89,11 +89,11 @@ pub struct BandwidthListener<TInner> {
sinks: Arc<BandwidthSinks>,
}
impl<TInner, TConn> Stream for BandwidthListener<TInner>
impl<TInner, TConn, TErr> Stream for BandwidthListener<TInner>
where
TInner: TryStream<Ok = ListenerEvent<TConn>>
TInner: TryStream<Ok = ListenerEvent<TConn, TErr>, Error = TErr>
{
type Item = Result<ListenerEvent<BandwidthFuture<TConn>>, TInner::Error>;
type Item = Result<ListenerEvent<BandwidthFuture<TConn>, TErr>, TErr>;
fn poll_next(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>> {
let this = self.project();