* Close everything related to this connection token. * @param token The connection token to close. */
| 681 | * @param token The connection token to close. |
| 682 | */ |
| 683 | void ClientNetworkCoordinatorSocketHandler::CloseToken(std::string_view token) |
| 684 | { |
| 685 | /* Close all remaining STUN / TURN connections. */ |
| 686 | this->CloseStunHandler(token); |
| 687 | this->CloseTurnHandler(token); |
| 688 | |
| 689 | /* Close the caller of the connection attempt. */ |
| 690 | auto connecter_it = this->connecter.find(token); |
| 691 | if (connecter_it != this->connecter.end()) { |
| 692 | connecter_it->second.second->SetFailure(); |
| 693 | this->connecter.erase(connecter_it); |
| 694 | } |
| 695 | } |
| 696 | |
| 697 | /** |
| 698 | * Close all pending connection tokens. |
no test coverage detected