socket: don't pass return value from protocol handler to event handler

Event handler handles socket level error only, while protocol handler
handles in protocol level error. If protocol handler decides to
disconnect on error in any case, it should call disconnect instead of
return an error back to event handler.

Change-Id: I9375be98cc52cb969085333f3c7229a91207d1bd
updates: bz#1666143
Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
This commit is contained in:
Zhang Huan 2019-01-03 17:57:38 +08:00 committed by Amar Tumballi
parent 4d9935a4db
commit cd57145546

View File

@ -1356,7 +1356,7 @@ socket_event_poll_out(rpc_transport_t *this)
pthread_mutex_unlock(&priv->out_lock);
if (ret == 0)
ret = rpc_transport_notify(this, RPC_TRANSPORT_MSG_SENT, NULL);
rpc_transport_notify(this, RPC_TRANSPORT_MSG_SENT, NULL);
if (ret > 0)
ret = 0;
@ -2519,7 +2519,7 @@ socket_event_poll_in(rpc_transport_t *this, gf_boolean_t notify_handled)
event_handled(ctx->event_pool, priv->sock, priv->idx, priv->gen);
if (pollin) {
ret = rpc_transport_notify(this, RPC_TRANSPORT_MSG_RECEIVED, pollin);
rpc_transport_notify(this, RPC_TRANSPORT_MSG_RECEIVED, pollin);
rpc_transport_pollin_destroy(pollin);