mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-23 19:48:19 +00:00
H3: let client close connection gracefully
This commit is contained in:
@@ -95,6 +95,10 @@ impl Connection {
|
||||
conn: self.0.clone(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn close(self, error_code: u32, reason: &[u8]) {
|
||||
self.0.quic.close(error_code.into(), reason);
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Connecting {
|
||||
|
||||
@@ -33,7 +33,7 @@ impl Future for ConnectionDriver {
|
||||
|
||||
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
|
||||
match self.incoming.poll()? {
|
||||
Async::Ready(None) => return Err(Error::peer("incoming requests closed")),
|
||||
Async::Ready(None) => return Ok(Async::Ready(())),
|
||||
Async::Ready(Some(NewStream::Uni(_recv))) => {
|
||||
info!(self.log, "incoming uni stream ignored");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user