Skip to content

Commit

Permalink
fix: reconnect logic
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz committed Jan 11, 2024
1 parent 03ad2e5 commit 916b44f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/electron/src/devtools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@ function init() {
})
})

socket.on('vue-devtools:disconnect', () => {
function shutdown() {
app.unmount()
reload = null
socket.close()
init()
})
}

socket.on('vue-devtools:disconnect', shutdown)
socket.on('vue-devtools-disconnect-devtools', shutdown)
}

init()

0 comments on commit 916b44f

Please sign in to comment.