Comparing version 2.0.0 to 2.0.1
2.0.1 / 2017-09-29 | ||
================== | ||
* fix: support subscribe before ready | ||
2.0.0 / 2017-09-29 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -64,2 +64,3 @@ 'use strict'; | ||
this._inited = false; | ||
this._isClosed = false; | ||
this._closePromise = this.await('close'); | ||
@@ -124,3 +125,3 @@ | ||
return co(function* () { | ||
this._inited = false; | ||
this._isClosed = true; | ||
this._pullFromWhichNodeTable.clear(); | ||
@@ -181,3 +182,3 @@ this._subscriptions.clear(); | ||
while (this._inited && this.subscriptions.has(topic)) { | ||
while (!this._isClosed && this.subscriptions.has(topic)) { | ||
const mqList = this._topicSubscribeInfoTable.get(topic); | ||
@@ -278,3 +279,3 @@ let hasMsg = false; | ||
co(function* () { | ||
while (this._inited && this._processQueueTable.has(messageQueue.key)) { | ||
while (!this._isClosed && this._processQueueTable.has(messageQueue.key)) { | ||
try { | ||
@@ -284,3 +285,3 @@ yield this.executePullRequestImmediately(messageQueue); | ||
} catch (err) { | ||
if (this._inited) { | ||
if (!this._isClosed) { | ||
err.name = 'MQConsumerPullMessageError'; | ||
@@ -287,0 +288,0 @@ err.message = `[mq:consumer] pull message for queue: ${messageQueue.key}, occurred error: ${err.message}`; |
{ | ||
"name": "ali-ons", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"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
137138
3907