Changed read to read_exact for reading sphinx packets to increase reliability
This commit is contained in:
@@ -41,7 +41,7 @@ async fn process_socket_connection(
|
||||
) {
|
||||
let mut buf = [0u8; sphinx::PACKET_SIZE];
|
||||
loop {
|
||||
match socket.read(&mut buf).await {
|
||||
match socket.read_exact(&mut buf).await {
|
||||
// socket closed
|
||||
Ok(n) if n == 0 => {
|
||||
trace!("Remote connection closed.");
|
||||
|
||||
Reference in New Issue
Block a user