Fix always connecting to localhost issue
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "eventstore-node",
 | 
					  "name": "eventstore-node",
 | 
				
			||||||
  "version": "0.0.19",
 | 
					  "version": "0.0.20",
 | 
				
			||||||
  "description": "A port of the EventStore .Net ClientAPI to Node.js",
 | 
					  "description": "A port of the EventStore .Net ClientAPI to Node.js",
 | 
				
			||||||
  "main": "index.js",
 | 
					  "main": "index.js",
 | 
				
			||||||
  "types": "index.d.ts",
 | 
					  "types": "index.d.ts",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -136,7 +136,7 @@ TcpConnection.createConnectingConnection = function(
 | 
				
			|||||||
    onConnectionEstablished, onConnectionFailed, onConnectionClosed
 | 
					    onConnectionEstablished, onConnectionFailed, onConnectionClosed
 | 
				
			||||||
) {
 | 
					) {
 | 
				
			||||||
  var connection = new TcpConnection(log, connectionId, remoteEndPoint, 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) {
 | 
					  function onError(err) {
 | 
				
			||||||
    if (onConnectionFailed)
 | 
					    if (onConnectionFailed)
 | 
				
			||||||
      onConnectionFailed(connection, err);
 | 
					      onConnectionFailed(connection, err);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user