X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fhtpipe.c;h=02cbd35c004686170c0f7af00255fd1e11efb0ac;hb=HEAD;hp=223212ec37468c96b4dfc7b8eb4b4fbbb4e5a8c8;hpb=3840f76dcfe70eaee8a3981025f41a54baa67964;p=ashd.git diff --git a/src/htpipe.c b/src/htpipe.c index 223212e..02cbd35 100644 --- a/src/htpipe.c +++ b/src/htpipe.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -124,6 +125,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)) {