We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8a00e7 commit efb117eCopy full SHA for efb117e
protocols/ping/src/handler.rs
@@ -196,10 +196,12 @@ impl Handler {
196
return;
197
}
198
// Note: This timeout only covers protocol negotiation.
199
- StreamUpgradeError::Timeout => {
200
- debug_assert!(false, "ReadyUpgrade cannot time out");
201
- return;
202
- }
+ StreamUpgradeError::Timeout => Failure::Other {
+ error: Box::new(std::io::Error::new(
+ std::io::ErrorKind::TimedOut,
+ "ping protocol negotiation timed out",
203
+ )),
204
+ },
205
StreamUpgradeError::Apply(e) => void::unreachable(e),
206
StreamUpgradeError::Io(e) => Failure::Other { error: Box::new(e) },
207
};
0 commit comments