Open RandomNick2 opened 5 months ago
`
def bootstrap_from_webapi(self, cell_id=0):
"""
Fetches CM server list from WebAPI and replaces the current one
:param cellid: cell id (0 = global)
:type cellid: :class:`int`
:return: booststrap success
:rtype: :class:`bool`
"""
self._LOG.debug("Attempting bootstrap via WebAPI")
from steam import webapi
try:
resp = webapi.get('ISteamDirectory', 'GetCMList', 1, params={'cellid': cell_id,
'http_timeout': 3})
except Exception as exp:
self._LOG.error("WebAPI boostrap failed: %s" % str(exp))
return False
result = EResult(resp['response']['result'])
if result != EResult.OK:
self._LOG.error("GetCMList failed with %s" % repr(result))
return False
serverlist = resp['response']['serverlist']
self._LOG.debug("Received %d servers from WebAPI" % len(serverlist))
def str_to_tuple(serveraddr):
ip, port = serveraddr.split(':')
return str(ip), int(port)
self.clear()
self.cell_id = cell_id
self.merge_list(map(str_to_tuple, serverlist))
return True`
I think you need to add something like this
Connection timeout but i have good network
go run main.go started 2024/06/06 18:04:47 Connect failed: dial tcp 146.66.152.14:27017: connect: operation timed out