Merge pull request #442 from reedrosenbluth/proxy

check if proxy option is undefined, not if it exists
This commit is contained in:
Chris Clark
2015-07-21 17:11:42 -07:00

View File

@@ -437,7 +437,7 @@ Server.prototype.connect = function() {
log.info(this.getServerID(), 'connect');
}
if (this._remote.hasOwnProperty('proxy')) {
if (this._remote.proxy !== undefined) {
const parsed = url.parse(this._opts.url);
const opts = url.parse(this._remote.proxy);
opts.secureEndpoint = parsed.protocol === 'wss:';