add error message if realtime service is not reachable
This commit is contained in:
parent
6ccafacc87
commit
0f7546a4dc
@ -63,6 +63,29 @@
|
||||
enableLogging: true,
|
||||
enabledTransports: ['ws', 'wss'],
|
||||
});
|
||||
|
||||
if ("{{ auth()->user()->id }}" == 0) {
|
||||
let checkPusherInterval = null;
|
||||
let checkNumber = 0;
|
||||
let errorMessage = "Coolify could not connect to the new realtime service introduced in beta.154.<br>Please check the related <a href='https://coolify.io/docs/cloudflare-tunnels' target='_blank'>documentation</a> or get help on <a href='https://coollabs.io/discord' target='_blank'>Discord</a>.";
|
||||
checkPusherInterval = setInterval(() => {
|
||||
if (window.Echo) {
|
||||
if (window.Echo.connector.pusher.connection.state !== 'connected') {
|
||||
checkNumber++;
|
||||
if (checkNumber > 5) {
|
||||
clearInterval(checkPusherInterval);
|
||||
Livewire.emit('error', errorMessage);
|
||||
}
|
||||
} else {
|
||||
console.log('Coolify is now connected to the new realtime service introduced in beta.154.');
|
||||
clearInterval(checkPusherInterval);
|
||||
}
|
||||
} else {
|
||||
clearInterval(checkPusherInterval);
|
||||
Livewire.emit('error', errorMessage);
|
||||
}
|
||||
}, 2000);
|
||||
}
|
||||
@endauth
|
||||
let checkHealthInterval = null;
|
||||
let checkIfIamDeadInterval = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user