summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-03 22:02:46 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-03 22:02:46 +0000
commit77040a0d0aecd56090c48330cf4f03ec1aaa91f5 (patch)
treeac5dca7ff99eb159f8bb2955f5239e5e3727d25b /src
parent784af0fbe24082178f605e9a01a7faa89ca4250e (diff)
Added shutdown() calls on die
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@971 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd_io.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index 7330a3f6f..636710b8e 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -55,6 +55,11 @@ void Killed(int status)
if (log_file)
fclose(log_file);
send_error("Server terminated.");
+ // close down all listening sockets
+ for (int count = 0; count < boundPortCount; count++)
+ {
+ shutdown(openSockfd[count], 2);
+ }
exit(status);
}