From 3982f0416a39fe8e7f12b58ec2b1f84ef6d1bfe1 Mon Sep 17 00:00:00 2001 From: Daekeun Kang Date: Mon, 17 Jun 2024 20:21:32 +0900 Subject: [PATCH] Fix the openocd tcl socket connection problem (#1018) The openocd tcl socket connection problem is caused by the host name 'localhost' which is resolved to '::1' on some systems. This patch changes the host name to '127.0.0.1' to avoid the problem. --- src/openocd.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openocd.ts b/src/openocd.ts index c4543650..11e02a24 100644 --- a/src/openocd.ts +++ b/src/openocd.ts @@ -421,7 +421,7 @@ export class OpenOCDServerController extends EventEmitter implements GDBServerCo const tclPortName = createPortName(0, 'tclPort'); const tclPortNum = this.ports[tclPortName]; const obj = { - host: 'localhost', + host: '127.0.0.1', port: tclPortNum }; this.tclSocket = net.createConnection(obj, () => {