diff options
author | Test_User <hax@andrewyu.org> | 2024-08-12 23:45:35 -0400 |
---|---|---|
committer | Test_User <hax@andrewyu.org> | 2024-08-12 23:45:35 -0400 |
commit | 4b211d19da3f6a35e87fcb350527d9a992449b41 (patch) | |
tree | 275859ca4359e53353e9ce2f48c6ee9f87aaa802 /general_network.h | |
parent | 770cb2f15a96693cce0ba56acaf8dcee6b7339a1 (diff) | |
download | haxircd-4b211d19da3f6a35e87fcb350527d9a992449b41.tar.gz haxircd-4b211d19da3f6a35e87fcb350527d9a992449b41.zip |
Improve accept retrying conditions
Diffstat (limited to 'general_network.h')
-rw-r--r-- | general_network.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/general_network.h b/general_network.h index cfb61fb..9f35f64 100644 --- a/general_network.h +++ b/general_network.h @@ -37,6 +37,12 @@ #include "protocol_numbers.h" #include "table.h" +#ifdef ENONET +#define RETRY_ACCEPT (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK || errno == ENETDOWN || errno == EPROTO || errno == ENOPROTOOPT || errno == EHOSTDOWN || errno == ENONET || errno == EHOSTUNREACH || errno == EOPNOTSUPP || errno == ENETUNREACH) +#else +#define RETRY_ACCEPT (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK || errno == ENETDOWN || errno == EPROTO || errno == ENOPROTOOPT || errno == EHOSTDOWN || errno == EHOSTUNREACH || errno == EOPNOTSUPP || errno == ENETUNREACH) +#endif + struct network { int (*send)(void *handle, struct string msg); size_t (*recv)(void *handle, char *data, size_t len, char *err); |