From 8d7996e547d6717ff3c4f3972343264ac0fb9ca4 Mon Sep 17 00:00:00 2001 From: Nicolas Dextraze Date: Tue, 3 Jan 2017 10:44:39 -0800 Subject: [PATCH] Fix always connecting to localhost issue --- package.json | 2 +- src/transport/tcp/tcpConnection.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a0b0ae9..b112394 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eventstore-node", - "version": "0.0.19", + "version": "0.0.20", "description": "A port of the EventStore .Net ClientAPI to Node.js", "main": "index.js", "types": "index.d.ts", diff --git a/src/transport/tcp/tcpConnection.js b/src/transport/tcp/tcpConnection.js index 3d5d6b6..4d576b9 100644 --- a/src/transport/tcp/tcpConnection.js +++ b/src/transport/tcp/tcpConnection.js @@ -136,7 +136,7 @@ TcpConnection.createConnectingConnection = function( onConnectionEstablished, onConnectionFailed, onConnectionClosed ) { var connection = new TcpConnection(log, connectionId, remoteEndPoint, onConnectionClosed); - var socket = net.connect(remoteEndPoint); + var socket = net.connect(remoteEndPoint.port, remoteEndPoint.hostname); function onError(err) { if (onConnectionFailed) onConnectionFailed(connection, err);