summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/socket
diff options
context:
space:
mode:
authorZhang Huan <zhanghuan@open-fs.com>2019-01-03 17:57:38 +0800
committerAmar Tumballi <amarts@redhat.com>2019-01-22 06:59:37 +0000
commitcd5714554627fe90ee2c77685cb410a8fb25eceb (patch)
treecca2fd7f3157b6ba6db4eb430c59720d3845cf60 /rpc/rpc-transport/socket
parent4d9935a4db67be0237db5fc6a2b51086635571f6 (diff)
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>
Diffstat (limited to 'rpc/rpc-transport/socket')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 8539209805a..1762e913d27 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -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);