mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-16 12:45:04 +01:00
first test passes uwu
This commit is contained in:
parent
6f5fef2f23
commit
9a819bc3f4
7 changed files with 30 additions and 24 deletions
|
|
@ -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?,
|
||||
|
|
|
|||
|
|
@ -209,9 +209,6 @@ pub mod parse {
|
|||
let (input, _) = tag(31_u16.to_be_bytes())(input)?;
|
||||
let (input, channel_max) =
|
||||
domain_short(input).map_err(fail_err("field channel-max in method tune-ok"))?;
|
||||
if channel_max == 0 {
|
||||
fail!("number was 0 for field channel_max")
|
||||
}
|
||||
let (input, frame_max) =
|
||||
domain_long(input).map_err(fail_err("field frame-max in method tune-ok"))?;
|
||||
let (input, heartbeat) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue