From 9dd1e35a05166fa9e96f2234ce97aa2fdc72bd0e Mon Sep 17 00:00:00 2001 From: Fletcher Dunn Date: Fri, 3 Jul 2020 15:35:15 -0700 Subject: [PATCH] Fix bug classifying P2P failure reason Just because we did not gather any reflexive address that was enabled, that we failed to STUN. "Failed to gather any" is ambiguous English. We really meant "we did not gather any". Also, if we have a public IPv4 address, it could be that we did not STUN, because the STUN server told us that our address was already public, and so was not gathered as an additional address. --- .../clientlib/steamnetworkingsockets_p2p.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p.cpp b/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p.cpp index a4f6915..992c545 100644 --- a/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p.cpp +++ b/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p.cpp @@ -432,7 +432,7 @@ void CSteamNetworkConnectionP2P::GuessICEFailureReason( ESteamNetConnectionEnd & } // We failed to STUN? - if ( nFailedToGatherTypes & k_EICECandidate_Any_Reflexive ) + if ( ( nAllowedTypes & k_EICECandidate_Any_Reflexive ) != 0 && ( nGatheredTypes & (k_EICECandidate_Any_Reflexive|k_EICECandidate_IPv4_HostPublic) ) == 0 ) { if ( m_connectionConfig.m_P2P_STUN_ServerList.Get().empty() ) {