r2443: check return code of event_loop_once() to catch thet cases where the server
[amitay/samba.git] / source4 / libcli / raw / rawrequest.c
index 51c0c0b925aad8354d8a1802cfabe810e07b99ff..6536af307244779c02c75d218535a9fb9b1b46ff 100644 (file)
@@ -285,7 +285,9 @@ BOOL smbcli_request_receive(struct smbcli_request *req)
 
        /* keep receiving packets until this one is replied to */
        while (req->state <= SMBCLI_REQUEST_RECV) {
-               event_loop_once(req->transport->event.ctx);
+               if (event_loop_once(req->transport->event.ctx) != 0) {
+                       return False;
+               }
        }
 
        return req->state == SMBCLI_REQUEST_DONE;