]> www.dolda2000.com Git - ashd.git/commitdiff
htparser: Fixed up duplex timeouts.
authorFredrik Tolf <fredrik@dolda2000.com>
Sun, 19 Jun 2016 00:33:28 +0000 (02:33 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sun, 19 Jun 2016 00:33:28 +0000 (02:33 +0200)
src/htparser.c

index a738e2566f6dc866ea3ee48d4d6002ecb320f82e..d10121cd6a2bb0e6af60a3b36e032ab468b9b002 100644 (file)
@@ -333,7 +333,8 @@ static void passduplex(struct bufio *a, int afd, struct bufio *b, int bfd)
            if(ev)
                pfd[n++] = (struct selected){.fd = bfd, .ev = ev};
        }
-       sel = mblock(600, n, pfd);
+       if((sel = mblock(600, n, pfd)).ev == 0)
+           break;
        if(sel.fd == afd)
            sio = a;
        else if(sel.fd == bfd)