Fix always connecting to localhost issue

This commit is contained in:
Nicolas Dextraze 2017-01-03 10:44:39 -08:00
parent 3ae8086e8d
commit 8d7996e547
2 changed files with 2 additions and 2 deletions

View File

@ -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",

View File

@ -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);