summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-08-01 20:05:52 -0400
committerAdam <Adam@anope.org>2010-08-01 20:05:52 -0400
commit90976b66728fcc671f3ecc4a2d39e438d6d8bcb6 (patch)
tree3bfa64be578a52480b1c18535e46a14a72592df0 /src/main.cpp
parente8d6524411e188f4de32a231857b078b57aef151 (diff)
Fixed some issues with reconnecting if we disconnect from the uplink
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 9f108a4d9..453dba91b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -116,8 +116,6 @@ class UplinkSocket : public ClientSocket
~UplinkSocket()
{
- /* Process the last bits of data before disconnecting */
- SocketEngine->Process();
UplinkSock = NULL;
}
@@ -188,6 +186,7 @@ void do_restart_services()
UserListByUID.erase(it->second->GetUID());
}
ircdproto->SendSquit(Config.ServerName, quitmsg);
+ SocketEngine->Process();
delete UplinkSock;
close_log();
/* First don't unload protocol module, then do so */
@@ -236,6 +235,7 @@ static void services_shutdown()
while (!UserListByNick.empty())
delete UserListByNick.begin()->second;
}
+ SocketEngine->Process();
delete UplinkSock;
FOREACH_MOD(I_OnShutdown, OnShutdown());
/* First don't unload protocol module, then do so */
@@ -553,6 +553,18 @@ int main(int ac, char **av, char **envp)
delete u;
}
+ /* Nuke all channels */
+ for (channel_map::const_iterator it = ChannelList.begin(); it != ChannelList.end();)
+ {
+ Channel *c = it->second;
+ ++it;
+
+ delete c;
+ }
+
+ Me->SetFlag(SERVER_SYNCING);
+ Me->ClearLinks();
+
unsigned j = 0;
for (; j < (Config.MaxRetries ? Config.MaxRetries : j + 1); ++j)
{