Don't even look at af_family if accept() returns sa->sa_len == 0

This commit is contained in:
Brian Somers 2001-02-13 12:33:34 +00:00
parent c4fefc4887
commit 6d110b1be0
1 changed files with 4 additions and 0 deletions

View File

@ -102,6 +102,10 @@ server_Read(struct fdescriptor *d, struct bundle *bundle, const fd_set *fdset)
wfd = accept(s->fd, sa, &ssize);
if (wfd < 0)
log_Printf(LogERROR, "server_Read: accept(): %s\n", strerror(errno));
else if (sa->sa_len == 0) {
close(wfd);
wfd = -1;
}
} else
wfd = -1;