+21 November 2008: Wouter
+ - fixed tcp accept, errors were printed when they should not.
+
20 November 2008: Wouter
- fixup fatal error due to faulty error checking after tcp accept.
- add check in rlimit to avoid integer underflow.
if(new_fd == -1) {
#ifndef USE_WINSOCK
/* EINTR is signal interrupt. others are closed connection. */
- if( errno != EINTR
+ if( errno == EINTR || errno == EAGAIN
#ifdef EWOULDBLOCK
- && errno != EWOULDBLOCK
+ || errno == EWOULDBLOCK
#endif
#ifdef ECONNABORTED
- && errno != ECONNABORTED
+ || errno == ECONNABORTED
#endif
#ifdef EPROTO
- && errno != EPROTO
+ || errno == EPROTO
#endif /* EPROTO */
)
return -1;