Commit 5f52a9d4 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Initiate a connection close on an ESHUTDOWN error in stream receive

If the client stream receive code receives an ESHUTDOWN error either
because the server closed the connection, or because it sent a
callback which cannot be processed, then we should shut down
the connection.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 727fcc64
...@@ -705,6 +705,9 @@ static void xs_stream_data_receive(struct sock_xprt *transport) ...@@ -705,6 +705,9 @@ static void xs_stream_data_receive(struct sock_xprt *transport)
read += ret; read += ret;
cond_resched(); cond_resched();
} }
if (ret == -ESHUTDOWN)
kernel_sock_shutdown(transport->sock, SHUT_RDWR);
else
xs_poll_check_readable(transport); xs_poll_check_readable(transport);
out: out:
mutex_unlock(&transport->recv_mutex); mutex_unlock(&transport->recv_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment