Don't close the parent connection when a tunnel closes. Just clean up the request through it.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4053 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2022-11-19 21:42:54 +00:00
parent cb44d408cd
commit b65706ffc4
2 changed files with 5 additions and 4 deletions

View File

@ -1447,12 +1447,11 @@ void _tf_ssb_connection_destroy(tf_ssb_connection_t* connection, const char* rea
again = true;
break;
}
else if (connection->tunnel_connection == it)
else if (it == connection->tunnel_connection)
{
_tf_ssb_connection_remove_request(it, connection->tunnel_request_number);
connection->tunnel_connection = NULL;
_tf_ssb_connection_close(it, "tunnel closed");
again = true;
break;
connection->tunnel_request_number = 0;
}
}
}

View File

@ -432,6 +432,8 @@ void tf_ssb_test_rooms(const tf_test_options_t* options)
printf("Done.\n");
tf_ssb_connection_close(tun0);
tf_ssb_send_close(ssb0);
tf_ssb_send_close(ssb1);
tf_ssb_send_close(ssb2);