Skip to content

Cherry-Pick POLLHUP detection#80

Merged
tiagolobocastro merged 1 commit into
v25.05.x-mayastorfrom
pollhup
Jun 10, 2026
Merged

Cherry-Pick POLLHUP detection#80
tiagolobocastro merged 1 commit into
v25.05.x-mayastorfrom
pollhup

Conversation

@tiagolobocastro

Copy link
Copy Markdown
Member

No description provided.

When the peer closes a connection but unread data remains in the
receive buffer, recv(MSG_PEEK) returns > 0 and is_connected()
incorrectly reports true. Add poll(POLLHUP) check before
recv(MSG_PEEK) to detect peer hangup regardless of buffered data.

Fixes spdk#3842

Assisted-by: Cursor
Change-Id: Id5a835a6a3d1ceeac08e17ded2d442c300a176d2
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@nutanix.com>
Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/27957
Community-CI: Mellanox Build Bot
Tested-by: SPDK Automated Test System <spdkbot@gmail.com>
Reviewed-by: Jim Harris <jim.harris@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
@tiagolobocastro tiagolobocastro merged commit 62f28c5 into v25.05.x-mayastor Jun 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants