More tweaks
This commit is contained in:
@@ -136,7 +136,8 @@ impl<T> FramedRead<T> {
|
||||
}
|
||||
}
|
||||
Kind::Unknown => {
|
||||
unimplemented!()
|
||||
// Unknown frames are ignored
|
||||
return Ok(None);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -281,8 +281,8 @@ impl<T: AsyncRead> Future for ReadPreface<T> {
|
||||
let n = try_nb!(self.inner.as_mut().unwrap().read(&mut buf[..rem]));
|
||||
|
||||
if PREFACE[self.pos..self.pos+n] != buf[..n] {
|
||||
// TODO: Invalid connection preface
|
||||
unimplemented!();
|
||||
// TODO: Should this just write the GO_AWAY frame directly?
|
||||
return Err(ProtocolError.into());
|
||||
}
|
||||
|
||||
self.pos += n;
|
||||
|
||||
Reference in New Issue
Block a user