BarryServer : Git

All the code for all my projects
// BarryServer : Git / IRCWebHooks / commit / f3cb9f0deb7eed1c8666e950c52f074f400e2bf3 / src

// Related

IRCWebHooks

Barry Disconnect recovery f3cb9f0 (3 years, 3 months ago)
diff --git a/src/main.c b/src/main.c
index 877fb67..8152416 100644
--- a/src/main.c
+++ b/src/main.c
@@ -14,9 +14,13 @@ main(int argc, char *argv[])
 {
 	pthread_t srvThread, ircThread;
 	pthread_create(&srvThread, NULL, (void *) srv, NULL);
-	pthread_create(&ircThread, NULL, (void *) bot, NULL);
+
+	while (1) {
+		pthread_create(&ircThread, NULL, (void *) bot, NULL);
+		pthread_join(ircThread, NULL);
+	}
+
 	pthread_join(srvThread, NULL);
-	pthread_join(ircThread, NULL);
 
 	return 0;
 }