on idel, should be okay now?

This commit is contained in:
talksik
2022-05-14 09:51:22 -05:00
parent 5bc796f189
commit 51847a1fc0
@@ -45,12 +45,17 @@ export function SocketProvider({ children }: { children: React.ReactNode }) {
console.error(
'SOCKET | there was a problem with your app...connection closed likely due to idling or manual disconnect',
);
setFlowState(true);
socketConnection.disconnect();
socketConnection.removeAllListeners();
});
// client-side errors
socketConnection.on('connect_error', (err) => {
console.error(`SOCKETS | ${err.message}`);
toast.error('sorry...this is our bad...please refresh with cmd + r');
set$ws(null);
});
set$ws(socketConnection);