1
0
mirror of https://github.com/coturn/coturn.git synced 2025-12-24 17:31:00 +01:00
Gustavo Garcia c8663f4a91
fix turn session leak (#962)
Actually, as below, before fixing, the sessions_map may be larger and
larger when register_callback_on_ioa_socket inside
open_client_connection_session retrun -1. The reason is that, if
register_callback_on_ioa_socket return -1, no read/write/ event will be
registered and no timeout event will be registered, in this case, the
session will never be deleted from sessions_map.

![image](https://user-images.githubusercontent.com/23566147/186558792-089ed9b2-9eb0-4ece-b7c0-99eaca10ea99.png)

After fixing, when register_callback_on_ioa_socket fail,it doesn't
return immediately, instead, we still register
client_to_be_allocated_timeout_handler in the next step of
open_client_connection_session. In this case, the unuseful session will
be deleted and freed after timeout.

@eakraly @ggarber
2022-08-29 21:56:47 +02:00
..
2022-08-26 11:17:13 +08:00
2021-02-26 09:02:50 +08:00