jsonrpc: remove incorrect handling for send() == 0
recv() returns 0 when the remote end of the connection is shut down, but there is no such rule for send(). Remove the incorrect treatment of send() returning 0 as an error. The remaining code will treat a send() return value of 0 as a non-error condition and will continue to work correctly. Change-Id: Ia753b802d95428104a62d1acb13c5fa437add6b4 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/369299 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
684dd86f34
commit
2bcabb2004
@ -313,11 +313,6 @@ more:
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (rc == 0) {
|
||||
SPDK_TRACELOG(SPDK_TRACE_RPC, "remote closed connection\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
request->send_offset += rc;
|
||||
request->send_len -= rc;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user