Receive a constant stream of updates on websocket connection
This commit is contained in:
parent
efb9a0b6c5
commit
8be750aa97
|
@ -40,10 +40,7 @@ export function ConnectionProvider({ children }) {
|
|||
}, [connection]);
|
||||
|
||||
useEffect(() => {
|
||||
const id = setInterval(
|
||||
() => connection._rpcWebSocket.call('ping').catch(() => {}),
|
||||
2000,
|
||||
);
|
||||
const id = connection.onSlotChange(() => null);
|
||||
return () => clearInterval(id);
|
||||
}, [connection]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue