File diff r25943:47f48465656f → r25944:76ed289c5cb6
src/network/network_stun.cpp
Show inline comments
 
@@ -97,23 +97,29 @@ std::unique_ptr<ClientNetworkStunSocketH
 
}
 

	
 
NetworkRecvStatus ClientNetworkStunSocketHandler::CloseConnection(bool error)
 
{
 
	NetworkStunSocketHandler::CloseConnection(error);
 

	
 
	/* If our connecter is still pending, shut it down too. Otherwise the
 
	 * callback of the connecter can call into us, and our object is most
 
	 * likely about to be destroyed. */
 
	/* Also make sure any pending connecter is killed ASAP. */
 
	if (this->connecter != nullptr) {
 
		this->connecter->Kill();
 
		this->connecter = nullptr;
 
	}
 

	
 
	return NETWORK_RECV_STATUS_OKAY;
 
}
 

	
 
ClientNetworkStunSocketHandler::~ClientNetworkStunSocketHandler()
 
{
 
	if (this->connecter != nullptr) {
 
		this->connecter->Kill();
 
		this->connecter = nullptr;
 
	}
 
}
 

	
 
/**
 
 * Check whether we received/can send some data from/to the STUN server and
 
 * when that's the case handle it appropriately.
 
 */
 
void ClientNetworkStunSocketHandler::SendReceive()
 
{