You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Infura closes the idle websocket connections and we want to reconnect after that. The problem is that in the WebSocketProvider implementation of ethers the onclose handler is commented out and not a part of the WebSocketLike interface. To fix this issue we need to do a workaround. Can you enable onclose handler or is it planned an actual reconnect implementation out of the box?
Code Snippet
No response
Contract ABI
No response
Errors
No response
Environment
No response
Environment (Other)
No response
The text was updated successfully, but these errors were encountered:
It is planned (in the next minor release) to automatically reconnect, resubscribe and backfill events.
In the meantime though, you can add the listeners to the WebSocket before passing it to the WebSocketProvider. The limitations on the wrapped socket are intentional so other socket-like things can be done with minimal implementations.
I’ll update this issue as the resubscribe is implemented.
Ethers Version
6.8.1
Search Terms
No response
Describe the Problem
Infura
closes the idlewebsocket
connections and we want to reconnect after that. The problem is that in theWebSocketProvider
implementation ofethers
theonclose
handler is commented out and not a part of theWebSocketLike
interface. To fix this issue we need to do a workaround. Can you enableonclose
handler or is it planned an actual reconnect implementation out of the box?Code Snippet
No response
Contract ABI
No response
Errors
No response
Environment
No response
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: