summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--irc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/irc.c b/irc.c
index 3f0de3c..41739a3 100644
--- a/irc.c
+++ b/irc.c
@@ -27,6 +27,7 @@
 
 #include <assert.h>
 #include <err.h>
+#include <errno.h>
 #include <netdb.h>
 #include <netinet/in.h>
 #include <stdarg.h>
@@ -148,6 +149,7 @@ int ircConnect(const char *bindHost, const char *host, const char *port) {
 
 		error = connect(sock, ai->ai_addr, ai->ai_addrlen);
 		if (!error) break;
+		if (error && errno == EINTR) break; // connect continues asynchronously
 
 		close(sock);
 		sock = -1;