summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2017-11-26 13:48:15 +0000
committerFreeArtMan <dos21h@gmail.com>2017-11-26 13:48:15 +0000
commitf9fde53de7f9a506536268a7bef5f46bb5509641 (patch)
tree67e42b0a54e2a44fc6b6410c526b0c91b3d1b8c8
parenteb66d85246ac533a0c339668da12afe02e0fb0aa (diff)
downloadagni-f9fde53de7f9a506536268a7bef5f46bb5509641.tar.gz
agni-f9fde53de7f9a506536268a7bef5f46bb5509641.zip
E(I)mprove gethostbyname stability
-rw-r--r--agni.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/agni.c b/agni.c
index 5ccb6ff..9e56111 100644
--- a/agni.c
+++ b/agni.c
@@ -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
+}