diff --git a/src/proto/framed_read.rs b/src/proto/framed_read.rs index e4445a5..3fbc509 100644 --- a/src/proto/framed_read.rs +++ b/src/proto/framed_read.rs @@ -136,7 +136,8 @@ impl FramedRead { } } Kind::Unknown => { - unimplemented!() + // Unknown frames are ignored + return Ok(None); } }; diff --git a/src/server.rs b/src/server.rs index 1fee874..422c4f4 100644 --- a/src/server.rs +++ b/src/server.rs @@ -281,8 +281,8 @@ impl Future for ReadPreface { 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;