]> www.dolda2000.com Git - ashd.git/commitdiff
Make sure to wait for the rootplex to accept writes from htparser.
authorFredrik Tolf <fredrik@dolda2000.com>
Wed, 17 Dec 2008 23:36:01 +0000 (00:36 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Wed, 17 Dec 2008 23:36:01 +0000 (00:36 +0100)
src/htparser.c

index 6382bf2b0435b21a26e5b8952ee479d50e23ac47..4924b981c01019c7a9c3f32d3629dff2ad3eb67c 100644 (file)
@@ -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;