mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 01:17:35 -02:30
Move debug message inside if statement so that it only triggers when we try to reconnect
This commit is contained in:
@@ -31,9 +31,9 @@ export default function useWebsocket(subscribeGroups) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ws.current.onclose = e => {
|
ws.current.onclose = e => {
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.debug('Socket closed. Reconnecting...', e);
|
|
||||||
if (e.code !== 1000) {
|
if (e.code !== 1000) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.debug('Socket closed. Reconnecting...', e);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
connect();
|
connect();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
Reference in New Issue
Block a user