Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Commit 9fe8287

Browse files
committed
Confirm disconnect on python side
1 parent 8cc304e commit 9fe8287

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/common/debugger_communication_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,4 @@ def received_state(data):
8484
@sio.on("process_disconnect")
8585
def process_disconnect(data):
8686
sio.emit("disconnect_confirmation")
87-
print("python disconnected")
8887
sio.disconnect()

src/debuggerCommunicationServer.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,9 @@ export class DebuggerCommunicationServer {
4545
this.currentActiveDevice = currentActiveDevice;
4646
}
4747

48+
// send the message to start closing the connection
4849
public closeConnection(): void {
4950
this.disconnectSocketIo();
50-
this.serverIo.close();
51-
this.serverHttp.close();
52-
console.info("Closing the server");
5351
}
5452

5553
public setWebview(webviewPanel: WebviewPanel | undefined) {
@@ -106,6 +104,11 @@ export class DebuggerCommunicationServer {
106104
});
107105
}
108106
});
107+
socket.on("disconnect_confirmation", () => {
108+
this.serverIo.close();
109+
this.serverHttp.close();
110+
console.info("Closing the server");
111+
});
109112
});
110113
}
111114
public disconnectSocketIo() {

0 commit comments

Comments
 (0)