htpollflags: Return no poll flags if EOF has been reached.
[doldaconnect.git] / common / http.c
index 0338905..8190f2d 100644 (file)
@@ -163,6 +163,8 @@ int htpollflags(struct htconn *cn)
 {
     int ret;
     
+    if(cn->fd == -1)
+       return(0);
     ret = POLLIN;
     if((cn->state == STATE_SYN) || (cn->outbufdata > 0))
        ret |= POLLOUT;