diff --git a/src/proto/streams/recv.rs b/src/proto/streams/recv.rs
index a2c2977..b5f1158 100644
--- a/src/proto/streams/recv.rs
+++ b/src/proto/streams/recv.rs
@@ -780,6 +780,16 @@ impl Recv {
// Frame is trailer
stream.pending_recv.push_front(&mut self.buffer, event);
+ // Notify the recv task. This is done just in case
+ // `poll_trailers` was called.
+ //
+ // It is very likely that `notify_recv` will just be a no-op (as
+ // the task will be None), so this isn't really much of a
+ // performance concern. It also means we don't have to track
+ // state to see if `poll_trailers` was called before `poll_data`
+ // returned `None`.
+ stream.notify_recv();
+
// No more data frames
Ok(None.into())
},
@@ -793,11 +803,11 @@ impl Recv {
) -> Poll