diff options
author | FreeArtMan <dos21h@gmail.com> | 2017-11-26 13:48:15 +0000 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2017-11-26 13:48:15 +0000 |
commit | f9fde53de7f9a506536268a7bef5f46bb5509641 (patch) | |
tree | 67e42b0a54e2a44fc6b6410c526b0c91b3d1b8c8 | |
parent | eb66d85246ac533a0c339668da12afe02e0fb0aa (diff) | |
download | agni-f9fde53de7f9a506536268a7bef5f46bb5509641.tar.gz agni-f9fde53de7f9a506536268a7bef5f46bb5509641.zip |
E(I)mprove gethostbyname stability
-rw-r--r-- | agni.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1027,6 +1027,10 @@ int main(int argc, char **argv) { LOG_NONE_E("Cant allocate new server process\n"); } + //gethostbyname is shittu function and dont work on MT environment, + //so give that mother fucker time to not collide with all other threads + //wrap that shit in some thread(normal threads not POSIX crap) safe way + sleep(1); } /* event handler thread */ @@ -1075,4 +1079,4 @@ int main(int argc, char **argv) LOG_NONE_E("Exit\n"); return 0; -}
\ No newline at end of file +} |