Back to All

websocket stop listening until a new transaction coming

Hi everyone! i have some question about websocket.

I'm using alchemy.ws.on function with filter to listen events on smart contract. It is working well, but at some point the websocket is hang and stop listening to events. But once there is new transaction it's starting to work again. We need the websocket to keep alive.

Is there any way how to solve this issue?

Thanks!

ReadMe