New_Server() can call Conn_Close() in its error paths,
but that function decrements the number of current active
connections. Thus we need to increment it earlier.
return;
}
+ /* Conn_Close() decrements this counter again */
+ NumConnections++;
Client_SetIntroducer( c, c );
Client_SetToken( c, TOKEN_OUTBOUND );
return;
}
#endif
- NumConnections++;
LogDebug("Registered new connection %d on socket %d (%ld in total).",
new_sock, My_Connections[new_sock].sock, NumConnections);
Conn_OPTION_ADD( &My_Connections[new_sock], CONN_ISCONNECTING );