diff options
Diffstat (limited to 'blabouncer.c')
-rw-r--r-- | blabouncer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/blabouncer.c b/blabouncer.c index 0db2dca..c416c3e 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -1053,7 +1053,11 @@ int main(int argc, char *argv[]) { // I will try to keep to the notation of "server" meaning the real IRCd, "bouncer" meaning the bouncer, and "client" meaning the real IRC client // Create server socket - int serversockfd = createserversocket(settings.ircserver, settings.ircserverport); + int serversockfd; + if ((serversockfd = createserversocket(settings.ircserver, settings.ircserverport)) == -1) { + debugprint(DEBUG_CRIT, "main(): Couldn't connect to server, exiting.\n"); + exit(1); + } // Create client socket (after server so we can use its fd number later as fdmax) int clientsockfd = createclientsocket(settings.clientport); |