Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Commit 4791dd8

Browse files
author
icymind
committed
fix deleteVM/shutdownVM
1 parent 75fff35 commit 4791dd8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/renderer/components/Manage.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,14 +334,22 @@ export default {
334334
},
335335
shutdownVRouter: async function () {
336336
this.activeLoader = true
337-
await Utils.resetRoute()
337+
const hostonlyif = await VBox.getAssignedHostonlyInf(this.vrouter.name)
338+
const hostonlyInfIP = this.vrouter.config.virtualbox.hostonlyInfIP
339+
await this.vrouter.disconnect()
340+
logger.debug('about to trafficToPhysicalRouter')
341+
await Utils.trafficToPhysicalRouter(hostonlyif, hostonlyInfIP, '255.255.255.0')
338342
await VBox.saveState(this.vrouter.name)
339343
this.activeLoader = false
340344
app.quit()
341345
},
342346
deleteVRouter: async function () {
343347
this.activeLoader = true
344-
await Utils.resetRoute()
348+
const hostonlyif = await VBox.getAssignedHostonlyInf(this.vrouter.name)
349+
const hostonlyInfIP = this.vrouter.config.virtualbox.hostonlyInfIP
350+
await this.vrouter.disconnect()
351+
logger.debug('about to trafficToPhysicalRouter')
352+
await Utils.trafficToPhysicalRouter(hostonlyif, hostonlyInfIP, '255.255.255.0')
345353
await VBox.delete(this.vrouter.name, this.vrouter.config.openwrt.ip)
346354
this.activeLoader = false
347355
app.quit()

0 commit comments

Comments
 (0)