nvmf/tcp: Use the new sock_is_connected function during shutdown
Change-Id: I3cf8765bbbcddaeda731188c7911b1966b953bc4 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470514 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
5f856f4d65
commit
811a66e97e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user