summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang Huan <zhanghuan@open-fs.com>2018-12-29 15:51:13 +0800
committerShyamsundar Ranganathan <srangana@redhat.com>2019-02-04 14:50:00 +0000
commitf2d366835652b2911c96155f7c429ddf485c1a89 (patch)
tree2ffeb01f38745c1866de953f4773adb8f64f3363
parentcb7946c47f8c6dc1311d5d8f99d228ef7ce0160d (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#1651246 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com> (cherry picked from commit 0301a66bda44582e3a48519f2a5d365b0c38090d)
-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 fb1b0436628..c413b7d20ac 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -1334,6 +1334,8 @@ socket_event_poll_out(rpc_transport_t *this)
if (ret == 0)
rpc_transport_notify(this, RPC_TRANSPORT_MSG_SENT, NULL);
+ if (ret > 0)
+ ret = 0;
out:
return ret;
}