mirror of
https://github.com/osmarks/ngircd.git
synced 2025-05-21 08:34:10 +00:00
Enhance log messages on "recursive" connection errors
This commit is contained in:
parent
d56341c77b
commit
8f530eb315
@ -1181,8 +1181,8 @@ Conn_Close( CONN_ID Idx, const char *LogMsg, const char *FwdMsg, bool InformClie
|
|||||||
/* Is this link already shutting down? */
|
/* Is this link already shutting down? */
|
||||||
if( Conn_OPTION_ISSET( &My_Connections[Idx], CONN_ISCLOSING )) {
|
if( Conn_OPTION_ISSET( &My_Connections[Idx], CONN_ISCLOSING )) {
|
||||||
/* Conn_Close() has been called recursively for this link;
|
/* Conn_Close() has been called recursively for this link;
|
||||||
* probabe reason: Handle_Write() failed -- see below. */
|
* probable reason: Handle_Write() failed -- see below. */
|
||||||
LogDebug("Recursive request to close connection: %d", Idx );
|
LogDebug("Recursive request to close connection %d!", Idx );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1450,7 +1450,12 @@ Handle_Write( CONN_ID Idx )
|
|||||||
if (errno == EAGAIN || errno == EINTR)
|
if (errno == EAGAIN || errno == EINTR)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
Log(LOG_ERR, "Write error on connection %d (socket %d): %s!",
|
if (!Conn_OPTION_ISSET(&My_Connections[Idx], CONN_ISCLOSING))
|
||||||
|
Log(LOG_ERR,
|
||||||
|
"Write error on connection %d (socket %d): %s!",
|
||||||
|
Idx, My_Connections[Idx].sock, strerror(errno));
|
||||||
|
else
|
||||||
|
LogDebug("Recursive write error on connection %d (socket %d): %s!",
|
||||||
Idx, My_Connections[Idx].sock, strerror(errno));
|
Idx, My_Connections[Idx].sock, strerror(errno));
|
||||||
Conn_Close(Idx, "Write error", NULL, false);
|
Conn_Close(Idx, "Write error", NULL, false);
|
||||||
return false;
|
return false;
|
||||||
@ -2459,7 +2464,8 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
|
|||||||
Class_HandleServerBans(c);
|
Class_HandleServerBans(c);
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
else Log( LOG_DEBUG, "Resolver: discarding result for already registered connection %d.", i );
|
else
|
||||||
|
LogDebug("Resolver: discarding result for already registered connection %d.", i);
|
||||||
#endif
|
#endif
|
||||||
} /* cb_Read_Resolver_Result */
|
} /* cb_Read_Resolver_Result */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user