summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorZhang Huan <zhanghuan@open-fs.com>2019-01-03 17:57:38 +0800
committerShyamsundar Ranganathan <srangana@redhat.com>2019-02-04 14:48:20 +0000
commitcb7946c47f8c6dc1311d5d8f99d228ef7ce0160d (patch)
treed817e3949e6d3eb86da1050c2040971b12fa8a6a /rpc
parent0210aa3e2b405c16dda2b7d5be96f2cb79af08e8 (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#1651246 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com> (cherry picked from commit cd5714554627fe90ee2c77685cb410a8fb25eceb)
Diffstat (limited to 'rpc')
-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 b3f8b7fc580..fb1b0436628 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -1332,7 +1332,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);
out:
return ret;
@@ -2501,7 +2501,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);