mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 13:05:45 +00:00
vsock: absorb spurious EPOLLOUT events
This patch has been cherry-picked from the Firecracker tree. The reference commit is 109e631566350867dafa4b16c3919dfd1533eeea. This commit changes the vsock connection state machine behavior to absorb any EWOULDBLOCK errors recevied while handling an EPOLLOUT event. Previously, this condition would lead to immediate connection termination. Signed-off-by: Dan Horobeanu <dhr@amazon.com> Signed-off-by: Gabriel Ionescu <gbi@amazon.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
This commit is contained in:
parent
0530b4e1ed
commit
3ce4bd5ec8
@ -454,7 +454,13 @@ where
|
||||
"vsock: error flushing TX buf for (lp={}, pp={}): {:?}",
|
||||
self.local_port, self.peer_port, err
|
||||
);
|
||||
self.kill();
|
||||
match err {
|
||||
Error::TxBufFlush(inner) if inner.kind() == ErrorKind::WouldBlock => {
|
||||
// This should never happen (EWOULDBLOCK after EPOLLOUT), but
|
||||
// it does, so let's absorb it.
|
||||
}
|
||||
_ => self.kill(),
|
||||
};
|
||||
0
|
||||
});
|
||||
self.fwd_cnt += Wrapping(flushed as u32);
|
||||
|
Loading…
Reference in New Issue
Block a user