NOW its transactional

This commit is contained in:
Lev Kokotov
2022-02-04 17:57:54 -08:00
parent 52c4cac175
commit 17b690f759

View File

@@ -141,7 +141,9 @@ impl Client {
loop { loop {
// Only grab a connection once we have some traffic on the socket // Only grab a connection once we have some traffic on the socket
// TODO: this is not the most optimal way to share servers. // TODO: this is not the most optimal way to share servers.
match self.read.get_ref().ready(Interest::READABLE).await { let mut peek_buf = vec![0u8; 2];
match self.read.get_mut().peek(&mut peek_buf).await {
Ok(_) => (), Ok(_) => (),
Err(_) => return Err(Error::ClientDisconnected), Err(_) => return Err(Error::ClientDisconnected),
}; };