posix: Fix the pendinging_recv flag setting.
The statement in line 1199 is may not be correct: Actually, it should be following two cases to pendinging_recv into false; 1 posck->recv_pipe == NULL 2 psock->recv_pipe != NULL & avalable_bytes == 0; So this patch can fix this issue. Signed-off-by: Ziye Yang <ziye.yang@intel.com> Change-Id: Ie612f781b0848e1f0ab1b48dc8c45e39862b772a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1446 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
17d77576b6
commit
3f73038e25
@ -1196,7 +1196,7 @@ spdk_posix_sock_group_impl_poll(struct spdk_sock_group_impl *_group, int max_eve
|
|||||||
|
|
||||||
TAILQ_REMOVE(&group->pending_recv, psock, link);
|
TAILQ_REMOVE(&group->pending_recv, psock, link);
|
||||||
|
|
||||||
if (psock->recv_pipe != NULL || spdk_pipe_reader_bytes_available(psock->recv_pipe) == 0) {
|
if (psock->recv_pipe == NULL || spdk_pipe_reader_bytes_available(psock->recv_pipe) == 0) {
|
||||||
psock->pending_recv = false;
|
psock->pending_recv = false;
|
||||||
} else {
|
} else {
|
||||||
TAILQ_INSERT_TAIL(&group->pending_recv, psock, link);
|
TAILQ_INSERT_TAIL(&group->pending_recv, psock, link);
|
||||||
|
Loading…
Reference in New Issue
Block a user