-void TreeSocket::OnError(BufferedSocketError e)
-{
- Link* MyLink;
-
- if (this->LinkState == LISTENER)
- return;
-
- switch (e)
- {
- case I_ERR_CONNECT:
- Utils->Creator->RemoteMessage(NULL,"Connection failed: Connection to \002%s\002 refused", myhost.c_str());
- MyLink = Utils->FindLink(myhost);
- if (MyLink)
- Utils->DoFailOver(MyLink);
- break;
- case I_ERR_SOCKET:
- Utils->Creator->RemoteMessage(NULL,"Connection failed: Could not create socket");
- break;
- case I_ERR_BIND:
- Utils->Creator->RemoteMessage(NULL,"Connection failed: Error binding socket to address or port");
- break;
- case I_ERR_WRITE:
- Utils->Creator->RemoteMessage(NULL,"Connection failed: I/O error on connection");
- break;
- case I_ERR_NOMOREFDS:
- Utils->Creator->RemoteMessage(NULL,"Connection failed: Operating system is out of file descriptors!");
- break;
- default:
- if ((errno) && (errno != EINPROGRESS) && (errno != EAGAIN))
- Utils->Creator->RemoteMessage(NULL,"Connection to \002%s\002 failed with OS error: %s", myhost.c_str(), strerror(errno));
- break;
+ ServerInstance->SNO->WriteGlobalSno('l', "Connection to \2%s\2[%s] started.", linkID.c_str(),
+ (capab->link->HiddenFromStats ? "<hidden>" : capab->link->IPAddr.c_str()));
+ this->SendCapabilities(1);