diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-06-02 21:10:29 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-06-02 21:10:29 +0000 |
commit | 2f350cc665025a5b6b5fa52242be9c3b623567f9 (patch) | |
tree | dd0e25b8d8399bd8f3bba3d2614d2e2b50cc3f0e /src | |
parent | 4543fc23e9d0a70e9301c5c51f1d2315e50295d5 (diff) |
More fixes for Vincent bug
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1592 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/connection.cpp | 2 | ||||
-rw-r--r-- | src/servers.cpp | 12 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/connection.cpp b/src/connection.cpp index b9a613cea..14c108fd5 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -394,8 +394,6 @@ void ircd_connector::CloseConnection() { log(DEBUG,"Closing connection"); // flush the queues - this->sendq = ""; - this->ircdbuffer = ""; shutdown(this->fd,2); close(this->fd); } diff --git a/src/servers.cpp b/src/servers.cpp index f7bbe44a7..b66546f42 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -300,7 +300,6 @@ void serverrec::FlushWriteBuffers() if (!this->connectors[i].CheckPing()) { WriteOpers("*** Lost single connection to %s: Ping timeout",this->connectors[i].GetServerName().c_str()); - this->connectors[i].CloseConnection(); this->connectors[i].SetState(STATE_DISCONNECTED); if (!IsRoutable(this->connectors[i].GetServerName())) { @@ -309,6 +308,7 @@ void serverrec::FlushWriteBuffers() NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); DoSplit(this->connectors[i].GetServerName().c_str()); } + this->connectors[i].CloseConnection(); has_been_netsplit = true; } } @@ -316,7 +316,6 @@ void serverrec::FlushWriteBuffers() { // if we're here the write() caused an error, we cannot proceed WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",this->connectors[i].GetServerName().c_str(),this->connectors[i].GetWriteError().c_str()); - this->connectors[i].CloseConnection(); this->connectors[i].SetState(STATE_DISCONNECTED); if (!IsRoutable(this->connectors[i].GetServerName())) { @@ -325,6 +324,7 @@ void serverrec::FlushWriteBuffers() NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); DoSplit(this->connectors[i].GetServerName().c_str()); } + this->connectors[i].CloseConnection(); has_been_netsplit = true; } if ((this->connectors[i].HasBufferedOutput()) && (this->connectors[i].GetState() != STATE_DISCONNECTED)) @@ -333,7 +333,6 @@ void serverrec::FlushWriteBuffers() { // if we're here the write() caused an error, we cannot proceed WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",this->connectors[i].GetServerName().c_str(),this->connectors[i].GetWriteError().c_str()); - this->connectors[i].CloseConnection(); this->connectors[i].SetState(STATE_DISCONNECTED); if (!IsRoutable(this->connectors[i].GetServerName())) { @@ -342,6 +341,7 @@ void serverrec::FlushWriteBuffers() NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); DoSplit(this->connectors[i].GetServerName().c_str()); } + this->connectors[i].CloseConnection(); has_been_netsplit = true; } } @@ -477,7 +477,6 @@ bool serverrec::RecvPacket(std::deque<std::string> &messages, char* recvhost,std { log(DEBUG,"recv() failed for serverrec::RecvPacket(): EOF"); log(DEBUG,"Disabling connector: %s",this->connectors[i].GetServerName().c_str()); - this->connectors[i].CloseConnection(); this->connectors[i].SetState(STATE_DISCONNECTED); if (!IsRoutable(this->connectors[i].GetServerName())) { @@ -486,6 +485,7 @@ bool serverrec::RecvPacket(std::deque<std::string> &messages, char* recvhost,std NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); DoSplit(this->connectors[i].GetServerName().c_str()); } + this->connectors[i].CloseConnection(); has_been_netsplit = true; break; } @@ -495,7 +495,6 @@ bool serverrec::RecvPacket(std::deque<std::string> &messages, char* recvhost,std { log(DEBUG,"recv() failed for serverrec::RecvPacket(): %s",strerror(errno)); log(DEBUG,"Disabling connector: %s",this->connectors[i].GetServerName().c_str()); - this->connectors[i].CloseConnection(); this->connectors[i].SetState(STATE_DISCONNECTED); if (!IsRoutable(this->connectors[i].GetServerName())) { @@ -505,6 +504,7 @@ bool serverrec::RecvPacket(std::deque<std::string> &messages, char* recvhost,std DoSplit(this->connectors[i].GetServerName().c_str()); } has_been_netsplit = true; + this->connectors[i].CloseConnection(); break; } } @@ -514,7 +514,6 @@ bool serverrec::RecvPacket(std::deque<std::string> &messages, char* recvhost,std if (!this->connectors[i].AddBuffer(data)) { WriteOpers("*** Read buffer for %s exceeds maximum, closing connection!",this->connectors[i].GetServerName().c_str()); - this->connectors[i].CloseConnection(); this->connectors[i].SetState(STATE_DISCONNECTED); if (!IsRoutable(this->connectors[i].GetServerName())) { @@ -524,6 +523,7 @@ bool serverrec::RecvPacket(std::deque<std::string> &messages, char* recvhost,std DoSplit(this->connectors[i].GetServerName().c_str()); } has_been_netsplit = true; + this->connectors[i].CloseConnection(); break; } if (this->connectors[i].BufferIsComplete()) |