mirror of
https://github.com/glest/glest-source.git
synced 2025-09-30 17:39:02 +02:00
fixed horrible UPNP bugs related to timing, where ports would be either NOT properly opened or not closed due to thread timing and no thread protection.
This commit is contained in:
@@ -74,8 +74,10 @@ FTPServerThread::~FTPServerThread() {
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
// Remove any UPNP port forwarded ports
|
||||
//printf("In [%s::%s] Line: %d ServerSocket::getFTPServerPort() = %d\n",__FILE__,__FUNCTION__,__LINE__,ServerSocket::getFTPServerPort());
|
||||
UPNP_Tools::upnp_rem_redirect(ServerSocket::getFTPServerPort());
|
||||
for(int clientIndex = 1; clientIndex <= maxPlayers; ++clientIndex) {
|
||||
//printf("In [%s::%s] Line: %d ServerSocket::getFTPServerPort()+ clientIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,ServerSocket::getFTPServerPort()+ clientIndex);
|
||||
UPNP_Tools::upnp_rem_redirect(ServerSocket::getFTPServerPort() + clientIndex);
|
||||
}
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
Reference in New Issue
Block a user