diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-02-12 20:44:21 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-02-12 20:44:21 +0000 |
commit | 84951d4b109ddfe6b68871516afa0e76d3b8e3af (patch) | |
tree | 9a63dabed0cab473567f0c02263b88e2018f3652 /src | |
parent | 4917e95f693d190ea9ee60a903a115a4eb54572e (diff) |
Change around the order of InspIRCd::Cleanup(), as per bug #212
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6580 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/inspircd.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index ce8fc9521..354befcb3 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -86,6 +86,13 @@ void InspIRCd::Cleanup() } stats->BoundPortCount = 0; + /* Close all client sockets, or the new process inherits them */ + for (std::vector<userrec*>::const_iterator i = this->local_users.begin(); i != this->local_users.end(); i++) + { + (*i)->SetWriteError("Server shutdown"); + (*i)->CloseSocket(); + } + /* We do this more than once, so that any service providers get a * chance to be unhooked by the modules using them, but then get * a chance to be removed themsleves. @@ -103,10 +110,6 @@ void InspIRCd::Cleanup() this->UnloadModule(mymodnames[k].c_str()); } - /* Close all client sockets, or the new process inherits them */ - for (std::vector<userrec*>::const_iterator i = this->local_users.begin(); i != this->local_users.end(); i++) - (*i)->CloseSocket(); - /* Close logging */ this->Logger->Close(); } |