on idel, should be okay now?
This commit is contained in:
@@ -45,12 +45,17 @@ export function SocketProvider({ children }: { children: React.ReactNode }) {
|
|||||||
console.error(
|
console.error(
|
||||||
'SOCKET | there was a problem with your app...connection closed likely due to idling or manual disconnect',
|
'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
|
// client-side errors
|
||||||
socketConnection.on('connect_error', (err) => {
|
socketConnection.on('connect_error', (err) => {
|
||||||
console.error(`SOCKETS | ${err.message}`);
|
console.error(`SOCKETS | ${err.message}`);
|
||||||
toast.error('sorry...this is our bad...please refresh with cmd + r');
|
toast.error('sorry...this is our bad...please refresh with cmd + r');
|
||||||
|
set$ws(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
set$ws(socketConnection);
|
set$ws(socketConnection);
|
||||||
|
|||||||
Reference in New Issue
Block a user