Skip to content

Commit

Permalink
Use 127.0.0.1 instead of localhost when connecting
Browse files Browse the repository at this point in the history
* Addressing  #2310
  • Loading branch information
PEZ committed Sep 17, 2023
1 parent 73f172f commit 21c1d64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/joyride.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
})
Expand Down

0 comments on commit 21c1d64

Please sign in to comment.