Set the remote's address when initiating a direct UDP connection.

Without this, status change callbacks would always have an invalid remote
address if we were the one who initiated the connection.
This commit is contained in:
bobsayshilol
2019-04-17 21:03:01 +01:00
parent e25beb2e69
commit be9fca1b37
@@ -734,6 +734,9 @@ bool CSteamNetworkConnectionUDP::BInitConnect( const SteamNetworkingIPAddr &addr
Assert( m_identityRemote.IsInvalid() );
m_identityRemote.Clear();
// We just opened a socket aiming at this address, so we know what the remote addr will be.
m_netAdrRemote = netadrRemote;
// We should know our own identity, unless the app has said it's OK to go without this.
if ( m_identityLocal.IsInvalid() ) // Specific identity hasn't already been set (by derived class, etc)
{