fix memory leak in closing connections

This commit is contained in:
Noa Aarts 2024-10-19 14:05:37 +02:00
parent b0d74880dd
commit de3248c3c6
Signed by: noa
GPG key ID: 1850932741EFF672
7 changed files with 98 additions and 42 deletions

View file

@ -139,7 +139,9 @@ where
self.change_protocol(&protocol);
break 'outer;
}
Err(err) if err.kind() == ErrorKind::UnexpectedEof => return Ok(()),
Err(err) if err.kind() == ErrorKind::UnexpectedEof => {
increment_counter(self.counter);
return Ok(())},
Err(e) => return Err(e),
}
}