mirror of https://github.com/linkerd/linkerd2.git
proxy: Fix ConditionallyUpgradeServerToTls not being notified (#1209)
#1203 introduced a bug in the implementation of `Future` for `connection::ConditionallyUpgradeServerToTls`. If the attempt to match the current peek buffer was incomplete, the `Future` implementation would return `Ok(Async::NotReady)`. This results in the task yielding. However, in this case the task would not be notified again, as the `NotReady` state wasn't from an underlying IO resource. Instead, the would _never_ be ready. This branch fixes this issue by simply continuing the loop, so that we instead try to read more bytes from the socket and try to match again, until the match is successful or the _socket_ returns `NotReady`. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit is contained in:
parent
e3d61c9a70
commit
5bba831f9b
|
@ -231,7 +231,7 @@ impl Future for ConditionallyUpgradeServerToTls {
|
|||
return Ok(Async::Ready(conn));
|
||||
},
|
||||
tls::conditional_accept::Match::Incomplete => {
|
||||
return Ok(Async::NotReady);
|
||||
continue;
|
||||
},
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue