@@ -116,9 +116,6 @@ bool CConnectManager::Connect ( const char* szHost, unsigned short usPort, const
116
116
if ( !CCore::GetSingleton ().CheckDiskSpace () )
117
117
return false ;
118
118
119
- // Test: Fix some timeouts by trying a tcp connection
120
- pNet->GetHTTPDownloadManager ( EDownloadMode::CORE_UPDATER )->QueueFile ( m_strHost.c_str (), NULL , 0 , " " , 0 , true , NULL , NULL , false , 1 , 2000 );
121
-
122
119
// Set our packet handler
123
120
pNet->RegisterPacketHandler ( CConnectManager::StaticProcessPacket );
124
121
@@ -133,6 +130,7 @@ bool CConnectManager::Connect ( const char* szHost, unsigned short usPort, const
133
130
134
131
m_bIsConnecting = true ;
135
132
m_tConnectStarted = time ( NULL );
133
+ m_bHasSentTcpRequest = false ;
136
134
137
135
// Load server password
138
136
if ( m_strPassword.empty () )
@@ -250,6 +248,17 @@ void CConnectManager::DoPulse ( void )
250
248
}
251
249
}
252
250
251
+ if ( !m_bHasSentTcpRequest )
252
+ {
253
+ if ( time ( NULL ) >= m_tConnectStarted + 2 )
254
+ {
255
+ // Handle possible IP rejection by proving we exist with a TCP connection
256
+ g_pCore->GetNetwork ()->GetHTTPDownloadManager ( EDownloadMode::CORE_UPDATER )->QueueFile ( m_strHost.c_str (), NULL , 0 , " " , 0 , true , NULL , NULL , false , 1 , 2000 );
257
+ m_bHasSentTcpRequest = true ;
258
+ AddReportLog ( 9401 , SString ( " ConnectManager sent TCP connection request to %s" , m_strHost.c_str () ) );
259
+ }
260
+ }
261
+
253
262
// Time to timeout the connection?
254
263
if ( time ( NULL ) >= m_tConnectStarted + 8 )
255
264
{
0 commit comments