print("Error getting proxies", e)
Browse files
App/Chat/PoeChatrouter.py
CHANGED
|
@@ -23,6 +23,7 @@ async def fetch_predictions(data):
|
|
| 23 |
global proxy
|
| 24 |
proxies = []
|
| 25 |
proxy_set = proxy != ""
|
|
|
|
| 26 |
if not asyncio.get_event_loop().is_running():
|
| 27 |
# If not, create a new event loop
|
| 28 |
loop = asyncio.new_event_loop()
|
|
@@ -30,7 +31,7 @@ async def fetch_predictions(data):
|
|
| 30 |
else:
|
| 31 |
# If an event loop is already running, use the current one
|
| 32 |
loop = asyncio.get_event_loop()
|
| 33 |
-
fetcher = ProxyFetcher()
|
| 34 |
if not proxy_set:
|
| 35 |
try:
|
| 36 |
|
|
|
|
| 23 |
global proxy
|
| 24 |
proxies = []
|
| 25 |
proxy_set = proxy != ""
|
| 26 |
+
loop = None
|
| 27 |
if not asyncio.get_event_loop().is_running():
|
| 28 |
# If not, create a new event loop
|
| 29 |
loop = asyncio.new_event_loop()
|
|
|
|
| 31 |
else:
|
| 32 |
# If an event loop is already running, use the current one
|
| 33 |
loop = asyncio.get_event_loop()
|
| 34 |
+
fetcher = ProxyFetcher(loop=loop)
|
| 35 |
if not proxy_set:
|
| 36 |
try:
|
| 37 |
|