* Close the TURN handler. * @param token The token used for the TURN handler. */
| 662 | * @param token The token used for the TURN handler. |
| 663 | */ |
| 664 | void ClientNetworkCoordinatorSocketHandler::CloseTurnHandler(std::string_view token) |
| 665 | { |
| 666 | CloseWindowByClass(WC_NETWORK_ASK_RELAY, NRWCD_HANDLED); |
| 667 | |
| 668 | auto turn_it = this->turn_handlers.find(token); |
| 669 | if (turn_it == this->turn_handlers.end()) return; |
| 670 | |
| 671 | turn_it->second->CloseConnection(); |
| 672 | turn_it->second->CloseSocket(); |
| 673 | |
| 674 | /* We don't remove turn_handler here, as we can be called from within that |
| 675 | * turn_handler instance, so our object cannot be freed yet. Instead, we |
| 676 | * check later if the connection is closed, and free the object then. */ |
| 677 | } |
| 678 | |
| 679 | /** |
| 680 | * Close everything related to this connection token. |
no test coverage detected