From 7a523b2bc443c7031336d5afd6b6a884ba0e0fab Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Aug 2004 23:06:59 +0000 Subject: r1712: this should fix a bug with a spinning client when a server dies unexpectedly. bug found by abartlett. (This used to be commit 566b7a9ce986cdfeabb69f17c472782fc7494d43) --- source4/libcli/raw/clitransport.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/libcli/raw') diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c index 5290dd953d..784a6f1798 100644 --- a/source4/libcli/raw/clitransport.c +++ b/source4/libcli/raw/clitransport.c @@ -433,6 +433,10 @@ static void smbcli_transport_process_recv(struct smbcli_transport *transport) transport->recv_buffer.header + transport->recv_buffer.received, NBT_HDR_SIZE - transport->recv_buffer.received); + if (ret == 0) { + smbcli_transport_dead(transport); + return; + } if (ret == -1) { if (errno == EINTR || errno == EAGAIN) { return; -- cgit