Comparing version 1.0.3 to 1.0.4
@@ -85,4 +85,7 @@ var child_process = require('child_process'); | ||
if (msgObj.type.match(/(^|\.)http$/) && /bound_address/.test(msgObj.message)) { | ||
this.parsePort(msgObj.message); | ||
if (msgObj.type.match(/(^|\.)http$/) && /publish_address/.test(msgObj.message)) { | ||
if (!this.parsePort(msgObj.message)) { | ||
this.emit('log', 'unable to parse node port from ' + msgObj.message); | ||
return; | ||
} | ||
} | ||
@@ -128,6 +131,7 @@ | ||
Node.prototype.parsePort = function (message) { | ||
var matches = message.match(/publish_address\s*\{inet\[[^\/]*\/(\d+\.\d+\.\d+\.\d+):(\d+)\]\}/); | ||
var matches = message.match(/publish_address\s*\{[a-zA-Z\[]*\/(\d+\.\d+\.\d+\.\d+):(\d+)\]?\}/); | ||
if (matches) { | ||
this.address = matches[1]; | ||
this.port = matches[2]; | ||
return true; | ||
} | ||
@@ -134,0 +138,0 @@ }; |
{ | ||
"name": "libesvm", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "libesvm is a library for managning an Elasticsearch process for development and testing.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
50253
39
1291