Skip to content

Commit 76f126b

Browse files
Christian Weichelspoenemann
Christian Weichel
authored andcommitted
Make openocd stop properly
1 parent ec18cf0 commit 76f126b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arduino-debugger-extension/src/node/debug-adapter/cmsis-debug-session.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,13 @@ export class CmsisDebugSession extends GDBDebugSession {
393393
}
394394
}
395395

396-
// Stop gdb client and server
396+
// Stop gdb client and server - we give GDB five seconds to exit orderly before we kill the GDB server
397+
setTimeout(() => this.gdbServer.kill(), 5000);
397398
try {
398399
await this.gdb.sendGDBExit();
399400
} catch (e) {
400401
// Need to catch here in case the connection has already been closed
401402
}
402-
this.gdbServer.kill();
403403
}
404404

405405
public async shutdown() {

0 commit comments

Comments
 (0)