Increase max servers per ip limit

This commit is contained in:
Alibek Omarov 2021-10-12 12:27:05 +03:00
parent c6e95fd7f2
commit 4fa50a3bd0

View File

@ -13,6 +13,7 @@ from server_entry import ServerEntry
from protocol import MasterProtocol from protocol import MasterProtocol
LOG_FILENAME = 'pymaster.log' LOG_FILENAME = 'pymaster.log'
MAX_SERVERS_FOR_IP = 14
def logPrint( msg ): def logPrint( msg ):
logging.debug( msg ) logging.debug( msg )
@ -140,7 +141,7 @@ class PyMaster:
self.serverList.remove(i) self.serverList.remove(i)
else: else:
count += 1 count += 1
if( count > 7 ): if( count > MAX_SERVERS_FOR_IP ):
return return
# Generate a 32 bit challenge number # Generate a 32 bit challenge number