summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorZhang Huan <zhanghuan@open-fs.com>2018-12-29 15:51:13 +0800
committerRaghavendra G <rgowdapp@redhat.com>2019-01-17 08:29:48 +0000
commit0301a66bda44582e3a48519f2a5d365b0c38090d (patch)
treea7bde2748b3c956a915a7707865613359dd57776 /rpc
parent22778ca88977fa061c468ca257aec74d4e7d09f4 (diff)
socket: fix issue when socket write return with EAGAIN
In the case socket write return with EAGAIN, the remaining vector count is return all way back to event handler, making followup pollin event to skip handling and dispatch loop complains about failure. Even thought temporary write failure is not an error. [2018-12-29 07:31:41.772310] E [MSGID: 101191] [event-epoll.c:674:event_dispatch_epoll_worker] 0-epoll: Failed to dispatch handler Change-Id: Idf03d120b5f7619eda19720a583cbcc3e7da2504 updates: bz#1666143 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 8c2f50db359..81187eeca17 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -1358,6 +1358,8 @@ socket_event_poll_out(rpc_transport_t *this)
if (ret == 0)
ret = rpc_transport_notify(this, RPC_TRANSPORT_MSG_SENT, NULL);
+ if (ret > 0)
+ ret = 0;
out:
return ret;
}