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>
This commit is contained in:
Zhang Huan 2018-12-29 15:51:13 +08:00 committed by Raghavendra G
parent 22778ca889
commit 0301a66bda

View File

@ -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;
}