aboutsummaryrefslogtreecommitdiffstats
path: root/bitlbee.c
diff options
context:
space:
mode:
Diffstat (limited to 'bitlbee.c')
-rw-r--r--bitlbee.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitlbee.c b/bitlbee.c
index 64220914..5da5d6e1 100644
--- a/bitlbee.c
+++ b/bitlbee.c
@@ -238,6 +238,12 @@ gboolean bitlbee_io_new_client( GIOChannel *source, GIOCondition condition, gpoi
int new_socket = accept( global.listen_socket, (struct sockaddr *) &conn_info, &size );
pid_t client_pid = 0;
+ if( new_socket == -1 )
+ {
+ log_message( LOGLVL_WARNING, "Could not accept new connection: %s", strerror( errno ) );
+ return TRUE;
+ }
+
if( global.conf->runmode == RUNMODE_FORKDAEMON )
{
int fds[2];