Skip to content

Commit

Permalink
Fix the openocd tcl socket connection problem
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hulryung committed May 21, 2024
1 parent cfff611 commit 23d49a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openocd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, () => {
Expand Down

0 comments on commit 23d49a2

Please sign in to comment.