Commit 811a66e9 authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

nvmf/tcp: Use the new sock_is_connected function during shutdown



Change-Id: I3cf8765bbbcddaeda731188c7911b1966b953bc4
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470514


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarAlexey Marchuk <alexeymar@mellanox.com>
parent 5f856f4d
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2084,9 +2084,7 @@ spdk_nvmf_tcp_sock_process(struct spdk_nvmf_tcp_qpair *tqpair)
			spdk_nvmf_tcp_pdu_payload_handle(tqpair);
			break;
		case NVME_TCP_PDU_RECV_STATE_ERROR:
			/* Check whether the connection is closed. Each time, we only read 1 byte every time */
			rc = nvme_tcp_read_data(tqpair->sock, 1, (void *)&pdu->hdr->common);
			if (rc < 0) {
			if (!spdk_sock_is_connected(tqpair->sock)) {
				return NVME_TCP_PDU_FATAL;
			}
			break;