From f9fde53de7f9a506536268a7bef5f46bb5509641 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Sun, 26 Nov 2017 13:48:15 +0000 Subject: E(I)mprove gethostbyname stability --- agni.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 +} -- cgit v1.2.3