X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fhtpipe.c;h=27e54808ea8b3ef39cd04bce53911c2dcd4e3b34;hb=7d1e14f405f389656604c68e18a381feabcd3d4a;hp=7bfde7512cda4b7e49c4d65bac794a57cbdf77ad;hpb=805fef2b3f7bc342bfee0156e940b2bb237dfb15;p=ashd.git diff --git a/src/htpipe.c b/src/htpipe.c index 7bfde75..27e5480 100644 --- a/src/htpipe.c +++ b/src/htpipe.c @@ -104,6 +104,7 @@ static void runserver(int lsk, int ch) struct hthead *req; ncl = 0; + cl = NULL; while(1) { struct pollfd pfd[ncl + 1]; for(i = 0; i < ncl; i++) { @@ -123,6 +124,7 @@ static void runserver(int lsk, int ch) if((rfd = recvreq(cl[i], &req)) < 0) { if(errno != 0) flog(LOG_ERR, "htpipe: error from client: %s", strerror(errno)); + close(cl[i]); cl[i] = -1; } else { if(sendreq(ch, req, rfd)) {