Commit Diff
- Commit:
c62a411f4f5c0a9b9ef6a1a474ee976bf5f711af
- From:
- Omar Polo <op@omarpolo.com>
- Date:
- Message:
- don't die on ECONNABORTED ECONNABORTED is returned if a connections gets aborted after being queued before the accept(2). I had some cases of accept: Software caused connection abort on FreeBSD, this should avoid that.
- Actions:
- Patch | Tree
--- server.c +++ server.c @@ -1284,7 +1284,8 @@ do_accept(int sock, short et, void *d) saddr = (struct sockaddr*)&addr; len = sizeof(addr); if ((fd = accept(sock, saddr, &len)) == -1) { - if (errno == EWOULDBLOCK || errno == EAGAIN) + if (errno == EWOULDBLOCK || errno == EAGAIN || + errno == ECONNABORTED) return; fatal("accept: %s", strerror(errno)); }