Commit 2bcabb20 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/369299


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 684dd86f
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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;