Hi
i use Moralis wss endpoint for BSC as below:
MORALIS_NODE_WSS i copy from my dashboard BSC endpoint.
provider = new ethers.providers.WebSocketProvider(MORALIS_NODE_WSS);
provider.on(āpendingā, async (txHash) => {
// do some stuff hereā¦
}
it can work for 10 seconds then the websocket will closed and i do the retry but can
not connect anymore. you need to wait for maybe 20 seconds then it will work again for another 10 - 20 seconds
is this normal ? how can i solve this ?