bibibi12345 commited on
Commit
389a51f
·
1 Parent(s): 49b04cf

proxy pool race condition fixed

Browse files
Files changed (1) hide show
  1. freeplay2api.py +0 -16
freeplay2api.py CHANGED
@@ -236,22 +236,6 @@ class FreeplayClient:
236
  logging.warning(f"Registration attempt {attempt}/50 failed with status {response.status_code}: {response.text}")
237
  logging.info(f"CONTINUING TO NEXT ATTEMPT {attempt + 1}")
238
 
239
- except requests.exceptions.ProxyError as e:
240
- logging.warning(f"Proxy error during registration on attempt {attempt}/50: {e}. Retrying with a new proxy...")
241
- if self.proxy_pool and proxy_info:
242
- self.proxy_pool.remove_proxy(proxy_info['ip'], proxy_info['port'])
243
- logging.info(f"CONTINUING AFTER PROXY ERROR TO ATTEMPT {attempt + 1}")
244
- # Explicitly continue to next iteration
245
- continue
246
-
247
- except requests.exceptions.RequestException as e:
248
- logging.warning(f"Request exception during registration on attempt {attempt}/50: {e}. Retrying...")
249
- if self.proxy_pool and proxy_info:
250
- self.proxy_pool.remove_proxy(proxy_info['ip'], proxy_info['port'])
251
- logging.info(f"CONTINUING AFTER REQUEST EXCEPTION TO ATTEMPT {attempt + 1}")
252
- # Explicitly continue to next iteration
253
- continue
254
-
255
  except Exception as e:
256
  logging.error(f"An unexpected error occurred during registration on attempt {attempt}/50: {e}. Retrying...")
257
  logging.info(f"CONTINUING AFTER UNEXPECTED ERROR TO ATTEMPT {attempt + 1}")
 
236
  logging.warning(f"Registration attempt {attempt}/50 failed with status {response.status_code}: {response.text}")
237
  logging.info(f"CONTINUING TO NEXT ATTEMPT {attempt + 1}")
238
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  except Exception as e:
240
  logging.error(f"An unexpected error occurred during registration on attempt {attempt}/50: {e}. Retrying...")
241
  logging.info(f"CONTINUING AFTER UNEXPECTED ERROR TO ATTEMPT {attempt + 1}")