summaryrefslogtreecommitdiff
path: root/src/tokio_util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tokio_util.rs')
-rw-r--r--src/tokio_util.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tokio_util.rs b/src/tokio_util.rs
index 5322f2955..3dddff9c2 100644
--- a/src/tokio_util.rs
+++ b/src/tokio_util.rs
@@ -69,6 +69,10 @@ impl Future for Accept {
// notified to error out (instead of stuck forever).
AcceptState::Pending(ref mut r) => match r.poll_accept() {
Ok(futures::prelude::Async::Ready(t)) => {
+ // Notice: it is possible to be Ready on the first poll.
+ // When eager accept fails due to WouldBlock,
+ // a next poll() might still be immediately Ready.
+ // See https://github.com/denoland/deno/issues/1756.
r.untrack_task();
t
}