From 2bcabb20043c52f45a3168b1e1e30c25242e4855 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 12 Jul 2017 14:33:36 -0700 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/369299 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- lib/jsonrpc/jsonrpc_server_tcp.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/jsonrpc/jsonrpc_server_tcp.c b/lib/jsonrpc/jsonrpc_server_tcp.c index 018b4e0a12..346d8b24fe 100644 --- a/lib/jsonrpc/jsonrpc_server_tcp.c +++ b/lib/jsonrpc/jsonrpc_server_tcp.c @@ -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;