From: Andrew Tridgell Date: Sat, 21 Feb 2004 04:02:00 +0000 (+0000) Subject: fixed a problem with the smb client code spinning when the connection X-Git-Tag: samba-misc-tags/initial-v4-0-unstable~13035 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=138cb5f2f5f8ce1479ac687d18e6a0e355e55b7f;hp=da5f22976fb40ec96160439c7a926a15805fc7f0 fixed a problem with the smb client code spinning when the connection is lost. We now close the cli_transport when there is a socket io error --- diff --git a/source/libcli/raw/rawrequest.c b/source/libcli/raw/rawrequest.c index 4191d3775ee..2b84345abb1 100644 --- a/source/libcli/raw/rawrequest.c +++ b/source/libcli/raw/rawrequest.c @@ -309,7 +309,11 @@ BOOL cli_request_receive(struct cli_request *req) return False; } - cli_request_receive_next(req->transport); + if (!cli_request_receive_next(req->transport)) { + cli_transport_close(req->transport); + req->status = NT_STATUS_UNEXPECTED_NETWORK_ERROR; + return False; + } } return True;