From 21c1d64dc932094ae9161f8dad1652f887848e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Str=C3=B6mberg?= Date: Sun, 17 Sep 2023 12:22:26 +0200 Subject: [PATCH] Use 127.0.0.1 instead of localhost when connecting * Addressing #2310 --- src/connector.ts | 8 ++++---- src/joyride.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/connector.ts b/src/connector.ts index 6d39e0e00..ba307a2c1 100644 --- a/src/connector.ts +++ b/src/connector.ts @@ -656,9 +656,9 @@ async function makeCljsSessionClone(session, repl: ReplType, projectTypeName: st async function promptForNreplUrlAndConnect(port, connectSequence: ReplConnectSequence) { const url = await vscode.window.showInputBox({ - placeHolder: 'Enter existing nREPL hostname:port here...', - prompt: "Add port to nREPL if localhost, otherwise 'hostname:port'", - value: 'localhost:' + (port ? port : ''), + placeHolder: 'nREPL host:port to connect to', + prompt: "Add port to nREPL if 127.0.0.1, otherwise 'host:port'", + value: '127.0.0.1:' + (port ? port : ''), ignoreFocusOut: true, }); // state.reset(); TODO see if this should be done @@ -711,7 +711,7 @@ export async function connect( } } if (port) { - hostname = hostname !== undefined ? hostname : 'localhost'; + hostname = hostname !== undefined ? hostname : '127.0.0.1'; outputWindow.appendLine(`; Using host:port ${hostname}:${port} ...`); if (isAutoConnect) { setStateValue('hostname', hostname); diff --git a/src/joyride.ts b/src/joyride.ts index 2146cefa3..cb48fb917 100644 --- a/src/joyride.ts +++ b/src/joyride.ts @@ -63,7 +63,7 @@ export async function joyrideJackIn(projectDir: string) { .startNReplServer(projectDir) .then(async (port) => { utilities.setLaunchingState(null); - await connector.connect(connectSequences.joyrideDefaults[0], true, 'localhost', `${port}`); + await connector.connect(connectSequences.joyrideDefaults[0], true, '127.0.0.1', `${port}`); outputWindow.appendLine('; Jack-in done.'); outputWindow.appendPrompt(); })