ssb: Try harder to avoid doing things with new connections during shutdown.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 26m2s

This commit is contained in:
2025-01-16 12:47:50 -05:00
parent 5ce4f55228
commit 3e3d58a4a9
2 changed files with 12 additions and 1 deletions

View File

@ -2926,7 +2926,7 @@ static void _tf_ssb_connection_tunnel_callback(
tf_ssb_connection_t* tf_ssb_connection_tunnel_create(tf_ssb_t* ssb, const char* portal_id, int32_t request_number, const char* target_id, int connect_flags)
{
tf_ssb_connection_t* connection = tf_ssb_connection_get(ssb, portal_id);
if (!connection)
if (!connection || ssb->shutting_down)
{
return NULL;
}
@ -3052,6 +3052,11 @@ static void _tf_ssb_on_connection(uv_stream_t* stream, int status)
return;
}
if (ssb->shutting_down)
{
tf_printf("Ignoring SHS connection during shutdown.\n");
}
tf_ssb_connection_t* connection = _tf_ssb_connection_create_internal(ssb, "srv", s_connection_index++);
connection->tcp.data = connection;