Permalink
Browse files

- lophttpd: add extra check for STATE_ACCEPTING socket

  • Loading branch information...
stealth committed Dec 14, 2016
1 parent dc04539 commit cfb75c46d0ea05ff85ac8e7d268c376635e1ac36
Showing with 5 additions and 2 deletions.
  1. +5 −2 lonely.cc
View
@@ -418,13 +418,16 @@ int lonely_http::loop()
continue;
if ((pfds[i].revents & (POLLERR|POLLHUP|POLLNVAL)) != 0) {
cleanup(i);
// poll errors on accept() should never happen (any of above flags
// only trigger on output), but better play safe
if (peer->state() != STATE_ACCEPTING)
cleanup(i);
continue;
}
pfds[i].revents = 0;
// All below states have an event pending, since we wont
// All states below have an event pending, since we wont
// be here if revents would be 0
// new connection ready to accept?

0 comments on commit cfb75c4

Please sign in to comment.