diff --git a/src/mixins/socket.js b/src/mixins/socket.js index 44108992..cf7cb121 100644 --- a/src/mixins/socket.js +++ b/src/mixins/socket.js @@ -46,9 +46,9 @@ export default { transports: ['websocket'] }); - if (!socket.connected) { - console.error("Failed to connect to the backend") - } + socket.on("connect_error", (err) => { + console.error(`Failed to connect to the backend. Socket.io connect_error: ${err.message}`); + }); socket.on('info', (info) => { this.info = info;