diff --git a/src/views/Control/Kvm/KvmConsole.vue b/src/views/Control/Kvm/KvmConsole.vue
index d7ec31e..c028a9f 100644
--- a/src/views/Control/Kvm/KvmConsole.vue
+++ b/src/views/Control/Kvm/KvmConsole.vue
@@ -94,11 +94,16 @@
   },
   beforeDestroy() {
     window.removeEventListener('resize', this.resizeKvmWindow);
+    this.closeTerminal();
   },
   methods: {
     sendCtrlAltDel() {
       this.rfb.sendCtrlAltDel();
     },
+    closeTerminal() {
+      this.rfb.disconnect();
+      this.rfb = null;
+    },
     openTerminal() {
       const token = this.$store.getters['authentication/token'];
       this.rfb = new RFB(
