summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-23 18:03:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-23 18:03:04 +0000
commit5ced910478c16c8acb93c6f9bfc65886178e7dbe (patch)
tree1fd224b7158b6ffb24b2c5336c1e616531efd521 /src/commands.cpp
parent45b07a069108d661f7d3b63b040e4db5166a2dd8 (diff)
Tidied up some socket stuff into userrec
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1476 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 5531af3af..5466a6258 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -303,13 +303,7 @@ void handle_restart(char **parameters, int pcnt, userrec *user)
sleep(1);
for (int i = 0; i < 65536; i++)
{
- int on = 1;
- struct linger linger = { 0 };
- setsockopt(i, SOL_SOCKET, SO_REUSEADDR, (const char*)&on, sizeof(on));
- linger.l_onoff = 1;
- linger.l_linger = 1;
- setsockopt(i, SOL_SOCKET, SO_LINGER, (const char*)&linger,sizeof(linger));
- Blocking(i);
+ shutdown(i,2);
close(i);
}
sleep(2);
@@ -950,8 +944,7 @@ void handle_quit(char **parameters, int pcnt, userrec *user)
log(DEBUG,"epoll: List deletion failure!");
}
#endif
- shutdown(user->fd,2);
- close(user->fd);
+ user->CloseSocket();
}
if (iter != clientlist.end())