Browse Source

fix: disconnect from socket if modal closed

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/4705/head
mertmit 2 years ago
parent
commit
222246ae72
  1. 6
      packages/nc-gui/components/dlg/AirtableImport.vue

6
packages/nc-gui/components/dlg/AirtableImport.vue

@ -45,8 +45,6 @@ const enableAbort = ref(false)
let socket: Socket | null let socket: Socket | null
let socketInterval: NodeJS.Timer
const syncSource = ref({ const syncSource = ref({
id: '', id: '',
type: 'Airtable', type: 'Airtable',
@ -275,10 +273,10 @@ onMounted(async () => {
onBeforeUnmount(() => { onBeforeUnmount(() => {
if (socket) { if (socket) {
socket.removeAllListeners() socket.off('disconnect')
socket.disconnect() socket.disconnect()
socket.removeAllListeners()
} }
clearInterval(socketInterval)
}) })
</script> </script>

Loading…
Cancel
Save