Comparing version 3.0.0 to 3.1.0
3.1.0 / 2018-09-14 | ||
================== | ||
**others** | ||
* [[`d1de082`](http://github.com/ali-sdk/ali-ons/commit/d1de0823fcc860ae12133a0026ddcfe2105db82d)] - name-server-fault-tolerance (wujia <<geoff.j.wu@gmail.com>>) | ||
3.0.0 / 2018-07-03 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -171,3 +171,12 @@ 'use strict'; | ||
}); | ||
const response = await this.invoke(null, request, timeoutMillis); | ||
let response = {}; | ||
let count = this._namesrvAddrList.length; | ||
while (count--) { | ||
try { | ||
response = await this.invoke(null, request, timeoutMillis); | ||
break; | ||
} catch (err) { | ||
this.logger.warn(err); | ||
} | ||
} | ||
switch (response.code) { | ||
@@ -174,0 +183,0 @@ case ResponseCode.SUCCESS: |
@@ -27,3 +27,3 @@ 'use strict'; | ||
super(Object.assign({ initMethod: 'init' }, defaultOptions, options)); | ||
this._index = 0; | ||
this._inited = false; | ||
@@ -166,4 +166,4 @@ this._namesrvAddrList = []; | ||
if (!addr) { | ||
const index = Math.floor(Math.random() * this._namesrvAddrList.length); | ||
addr = this._namesrvAddrList[index]; | ||
this._index = ++this._index % this._namesrvAddrList.length; | ||
addr = this._namesrvAddrList[this._index]; | ||
} | ||
@@ -170,0 +170,0 @@ let channel = this._channels.get(addr); |
{ | ||
"name": "ali-ons", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Aliyun Open Notification Service Client", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
139620
3910