aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/network.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/network.c')
-rw-r--r--FICS/network.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/FICS/network.c b/FICS/network.c
index 752efd2..5b2f2ac 100644
--- a/FICS/network.c
+++ b/FICS/network.c
@@ -627,7 +627,14 @@ ngc2(comstr_t *cs, int timeout)
psend_raw_file(fd, mess_dir, MESS_FULL);
close(fd);
} else {
- process_new_connection(fd, net_connected_host(fd));
+ unsigned int fromHost = 0;
+
+ if (!net_connected_host(fd, &fromHost)) {
+ close(fd);
+ continue;
+ }
+
+ process_new_connection(fd, fromHost);
}
}