diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-04-01 23:40:53 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-04-01 23:40:53 +0000 |
commit | fde5d20a0a6805e66a26becb0b74d0ddb2cdb962 (patch) | |
tree | baa1bfcc17dc324f86b4726c2e5d685f8e5bf247 /src/modules | |
parent | 239196ce7df222ea8331f9b755860b7d697a7531 (diff) |
Fixes for stability of connects (these didnt make it into trunk!!!)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3795 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 4830d715d..31df4852d 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -3220,13 +3220,13 @@ class ModuleSpanningTree : public Module // an autoconnected server is not connected. Check if its time to connect it WriteOpers("*** AUTOCONNECT: Auto-connecting server \002%s\002 (%lu seconds until next attempt)",x->Name.c_str(),x->AutoConnect); TreeSocket* newsocket = new TreeSocket(x->IPAddr,x->Port,false,10,x->Name.c_str()); - if (newsocket->GetState() != I_ERROR) + if (newsocket->GetFd() > -1) { Srv->AddSocket(newsocket); } else { - WriteOpers("*** AUTOCONNECT: Error autoconnecting \002%s\002.",x->Name.c_str()); + WriteOpers("*** AUTOCONNECT: Error autoconnecting \002%s\002: %s.",x->Name.c_str(),strerror(errno)); delete newsocket; } } @@ -3282,13 +3282,13 @@ class ModuleSpanningTree : public Module { WriteServ(user->fd,"NOTICE %s :*** CONNECT: Connecting to server: \002%s\002 (%s:%d)",user->nick,x->Name.c_str(),(x->HiddenFromStats ? "<hidden>" : x->IPAddr.c_str()),x->Port); TreeSocket* newsocket = new TreeSocket(x->IPAddr,x->Port,false,10,x->Name.c_str()); - if (newsocket->GetState() != I_ERROR) + if (newsocket->GetFd() > -1) { Srv->AddSocket(newsocket); } else { - WriteServ(user->fd,"NOTICE %s :*** CONNECT: Error connecting \002%s\002.",user->nick,x->Name.c_str()); + WriteServ(user->fd,"NOTICE %s :*** CONNECT: Error connecting \002%s\002: %s.",user->nick,x->Name.c_str(),strerror(errno)); delete newsocket; } return 1; |