diff options
| author | 2005-04-20 02:48:12 +0000 | |
|---|---|---|
| committer | 2005-04-20 02:48:12 +0000 | |
| commit | 1e4d37149c3c44a479dc3440a650e433c7f1b9c2 (patch) | |
| tree | 5001350220a145beee03f9f048aa01094c128f53 /src/commands.cpp | |
| parent | Fixed fd leaks (diff) | |
Added OnUserDisconnect method to modules.* to fix fd leak in m_ident.cpp
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1134 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
| -rw-r--r-- | src/commands.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 088dabe68..e69ad41f6 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -93,7 +93,6 @@ extern bool nofork; extern time_t TIME; -extern std::vector<int> fd_reap; extern std::vector<std::string> module_names; extern char MyExecutable[1024]; @@ -927,8 +926,14 @@ void handle_quit(char **parameters, int pcnt, userrec *user) AddWhoWas(user); } + FOREACH_MOD OnUserDisconnect(user); + /* push the socket on a stack of sockets due to be closed at the next opportunity */ - fd_reap.push_back(user->fd); + if (user->fd > -1) + { + shutdown(user->fd,2); + close(user->fd); + } if (iter != clientlist.end()) { |
