mirror of https://github.com/omar-polo/gmid.git
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.
This commit is contained in:
parent
8af884dff4
commit
c62a411f4f
3
server.c
3
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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue