diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-06-02 14:16:40 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-06-02 14:16:40 +0000 |
commit | faa13181f742e2dd4e14ad5171e141806218e1e0 (patch) | |
tree | 8572e3464ddcec6524f0f76ca16ccff071cdf165 | |
parent | 2dcc6500908c3977f085a38046f36d6bb323840d (diff) |
Attempt to fix recursive loop
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1590 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/servers.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/servers.cpp b/src/servers.cpp index 5448d01da..2675849a5 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -380,10 +380,18 @@ bool serverrec::SendPacket(char *message, const char* sendhost) if (!strcasecmp(this->connectors[k].routes[m].c_str(),sendhost)) { log(DEBUG,"Found alternative route for packet: %s",this->connectors[k].GetServerName().c_str()); - char buffer[MAXBUF]; - snprintf(buffer,MAXBUF,"R %s %s",sendhost,message); - this->SendPacket(buffer,this->connectors[k].GetServerName().c_str()); - return true; + if (this->connectors[k].GetState() != STATE_DISCONNECTED) + { + char buffer[MAXBUF]; + snprintf(buffer,MAXBUF,"R %s %s",sendhost,message); + this->SendPacket(buffer,this->connectors[k].GetServerName().c_str()); + return true; + } + else + { + log(DEBUG,"Nope, this route is down..."); + return false; + } } } } |