Commit 3f73038e authored by Ziye Yang's avatar Ziye Yang Committed by Tomasz Zawadzki
Browse files

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: default avatarZiye Yang <ziye.yang@intel.com>
Change-Id: Ie612f781b0848e1f0ab1b48dc8c45e39862b772a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1446


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 17d77576
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);

		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;
		} else {
			TAILQ_INSERT_TAIL(&group->pending_recv, psock, link);