diff --git a/app/javascript/gabsocial/stream.js b/app/javascript/gabsocial/stream.js index 123390e9..46998340 100644 --- a/app/javascript/gabsocial/stream.js +++ b/app/javascript/gabsocial/stream.js @@ -76,6 +76,10 @@ export default function getStream(streamingAPIBaseURL, accessToken, stream, { co const ws = new WebSocketClient(`${streamingAPIBaseURL}/api/v1/streaming/?${params.join('&')}`, accessToken); ws.onopen = connected; + ws.onerror = (e) => { + // If errors, dont retry + ws.close(); + }; ws.onmessage = e => received(JSON.parse(e.data)); ws.onclose = disconnected; ws.onreconnect = reconnected;