mirror of
https://github.com/chainstacklabs/pumpfun-bonkfun-bot.git
synced 2026-07-27 23:37:45 +00:00
Update src/monitoring/pumpportal_listener.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -83,13 +83,17 @@ class PumpPortalListener(BaseTokenListener):
|
||||
|
||||
except websockets.exceptions.ConnectionClosed:
|
||||
logger.warning("PumpPortal WebSocket connection closed. Reconnecting...")
|
||||
finally:
|
||||
ping_task.cancel()
|
||||
try:
|
||||
await ping_task
|
||||
except asyncio.CancelledError:
|
||||
pass
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"PumpPortal WebSocket connection error: {e}")
|
||||
except Exception:
|
||||
logger.exception("PumpPortal WebSocket connection error")
|
||||
logger.info("Reconnecting in 5 seconds...")
|
||||
await asyncio.sleep(5)
|
||||
|
||||
async def _subscribe_to_new_tokens(self, websocket) -> None:
|
||||
"""Subscribe to new token events from PumpPortal.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user