parse the frame type

This commit is contained in:
nora 2022-02-09 15:19:18 +01:00
parent ccee6c36f6
commit e5fa49a05a
2 changed files with 32 additions and 7 deletions

View file

@ -1,6 +1,6 @@
use crate::error::{ProtocolError, TransError};
use crate::frame;
use anyhow::{ensure, Context};
use anyhow::Context;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::TcpStream;
use tracing::{debug, error};
@ -58,7 +58,7 @@ impl Connection {
Ok(())
} else {
debug!(?version, expected_version = ?PROTOCOL_VERSION, "Version negotiation failed, unsupported version");
return Err(ProtocolError::OtherCloseConnection.into());
Err(ProtocolError::OtherCloseConnection.into())
}
}
}