IRCWebHooks
Barry Disconnect recovery f3cb9f0 (4 years 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;
}