src/server/util/netbuf.c

branch
webdav
changeset 211
2160585200ac
parent 52
aced2245fb1c
child 330
71b652743871
--- a/src/server/util/netbuf.c	Tue Aug 13 22:14:32 2019 +0200
+++ b/src/server/util/netbuf.c	Thu Oct 31 10:26:35 2019 +0100
@@ -143,7 +143,11 @@
             return bytes_in_buffer;
         }
     }
-
+    
+    if(!buf->sd) {
+        return NETBUF_EOF;
+    }
+    
     /* The netbuf is empty.  Read data directly into the caller's buffer */
     bytes = net_read(buf->sd, buffer, size);
     if (bytes == 0)

mercurial