🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Retry connecting to the events endpoint more frequently on first load
Deluan1ee39835ddf8
diff --git a/ui/src/eventStream.js b/ui/src/eventStream.jsindex f16a520cc..938413d01 100644--- a/ui/src/eventStream.js+++ b/ui/src/eventStream.js@@ -6,8 +6,8 @@ let es = nulllet dispatch = nulllet timeout = nullconst defaultIntervalCheck = 20000-const errorIntervalCheck = 2000-let currentIntervalCheck = defaultIntervalCheck+const reconnectIntervalCheck = 2000+let currentIntervalCheck = reconnectIntervalCheckconst getEventStream = () => {if (es === null) {@@ -37,7 +37,7 @@ export const startEventStream = (dispatchFunc) => {dispatch = dispatchFuncsetTimeout(currentIntervalCheck)if (!localStorage.getItem('token')) {- console.log('Cannot create a unauthenticated EventSource')+ console.log('Cannot create a unauthenticated EventSource connection')return}const es = getEventStream()@@ -53,7 +53,7 @@ export const startEventStream = (dispatchFunc) => {{ trailing: true })es.onerror = (e) => {- setTimeout(errorIntervalCheck)+ setTimeout(reconnectIntervalCheck)dispatch(serverDown())}