bibibi12345 commited on
Commit
8976c40
·
1 Parent(s): 0d8f6c6

proxy pool race condition fixed

Browse files
Files changed (1) hide show
  1. freeplay2api.py +5 -0
freeplay2api.py CHANGED
@@ -188,6 +188,11 @@ class FreeplayClient:
188
 
189
  logging.info(f"Registration attempt {attempt}/50 using proxy {proxy_info['full'] if proxy_info else 'None'}")
190
 
 
 
 
 
 
191
  response = requests.post(
192
  url,
193
  data=json.dumps(payload),
 
188
 
189
  logging.info(f"Registration attempt {attempt}/50 using proxy {proxy_info['full'] if proxy_info else 'None'}")
190
 
191
+ # If no proxy available, skip this attempt
192
+ if self.proxy_pool and not proxy_info:
193
+ logging.warning(f"No proxy available for attempt {attempt}, skipping...")
194
+ continue
195
+
196
  response = requests.post(
197
  url,
198
  data=json.dumps(payload),