ServerInstance->SNO->WriteGlobalSno('l', "Connection to '\002%s\002' failed with error: %s",
linkID.c_str(), getError().c_str());
LinkState = DYING;
+ Close();
}
void TreeSocket::SendError(const std::string &errormessage)
ret = CMD_FAILURE;
server = server->GetParent();
}
+ else if (quitting->GetParent() != server)
+ throw ProtocolException("Attempted to SQUIT a non-directly connected server or the parent");
server->SQuitChild(quitting, params[1]);
// XXX: Return CMD_FAILURE when servers SQUIT themselves (i.e. :00S SQUIT 00S :Shutting down)
- // to avoid RouteCommand() being called. RouteCommand() requires a valid command source but we
- // do not have one because the server user is deleted when its TreeServer is destructed.
+ // to stop this message from being forwarded.
// The squit logic generates a SQUIT message with our sid as the source and sends it to the
// remaining servers.
return ret;