From: Fredrik Tolf Date: Wed, 17 Dec 2008 23:36:01 +0000 (+0100) Subject: Make sure to wait for the rootplex to accept writes from htparser. X-Git-Tag: 0.1~123 X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=commitdiff_plain;h=46c3d4304f2846f05f1c44f39b67563f9f1f3acb Make sure to wait for the rootplex to accept writes from htparser. --- diff --git a/src/htparser.c b/src/htparser.c index 6382bf2..4924b98 100644 --- a/src/htparser.c +++ b/src/htparser.c @@ -350,6 +350,8 @@ static void serve(struct muth *muth, va_list args) headappheader(req, "X-Ash-Address", inet_ntop(AF_INET6, &((struct sockaddr_in6 *)&name)->sin6_addr, nmbuf, sizeof(nmbuf))); headappheader(req, "X-Ash-Port", sprintf3("%i", ntohs(((struct sockaddr_in6 *)&name)->sin6_port))); } + if(block(plex, EV_WRITE, 60) <= 0) + goto out; if((cfd = sendreq(plex, req)) < 0) goto out;