Browse Source

refactor: close socket connection on error

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/1668/head
Pranav C 3 years ago
parent
commit
f5da0d8ac2
  1. 5
      packages/nc-gui/plugins/tele.js

5
packages/nc-gui/plugins/tele.js

@ -33,6 +33,11 @@ export default function({
path: route.matched[0].path + (route.query && route.query.type ? `?type=${route.query.type}` : '') path: route.matched[0].path + (route.query && route.query.type ? `?type=${route.query.type}` : '')
}) })
}) })
socket.on('connect_error', () => {
socket.disconnect()
socket = null
})
} }
const tele = { const tele = {
emit(evt, data) { emit(evt, data) {

Loading…
Cancel
Save