first test passes uwu

This commit is contained in:
nora 2022-02-22 13:15:59 +01:00
parent 6f5fef2f23
commit 9a819bc3f4
7 changed files with 30 additions and 24 deletions

View file

@ -257,8 +257,15 @@ impl Connection {
debug!(?method, "Received method");
match method {
Method::ConnectionClose { .. } => {
// todo: handle closing
Method::ConnectionClose {
reply_code,
reply_text,
class_id,
method_id,
} => {
info!(%reply_code, %reply_text, %class_id, %method_id, "Closing connection");
self.send_method(0, Method::ConnectionCloseOk {}).await?;
return Err(ProtocolError::GracefulClose.into());
}
Method::ChannelOpen { .. } => self.channel_open(frame.channel).await?,
Method::ChannelClose { .. } => self.channel_close(frame.channel, method).await?,