Comparing version 2.0.2 to 2.0.3
2.0.3 / 2017-11-11 | ||
================== | ||
* fix: memory leak may occurred cause by Promise.race | ||
* doc: fix consumer and producer initialize issue | ||
2.0.2 / 2017-10-09 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -65,3 +65,2 @@ 'use strict'; | ||
this._isClosed = false; | ||
this._closePromise = this.await('close'); | ||
@@ -220,6 +219,3 @@ if (this.messageModel === MessageModel.CLUSTERING) { | ||
if (!hasMsg) { | ||
yield Promise.race([ | ||
this._closePromise, | ||
this.await(`topic_${topic}_changed`), | ||
]); | ||
yield this.await(`topic_${topic}_changed`); | ||
} | ||
@@ -656,6 +652,3 @@ } | ||
_sleep(timeout) { | ||
return Promise.race([ | ||
this._closePromise, | ||
sleep(timeout), | ||
]); | ||
return sleep(timeout); | ||
} | ||
@@ -662,0 +655,0 @@ } |
{ | ||
"name": "ali-ons", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Aliyun Open Notification Service Client", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -57,2 +57,3 @@ ali-ons | ||
const httpclient = require('urllib'); | ||
const Producer = require('ali-ons').Producer; | ||
@@ -62,2 +63,3 @@ const Message = require('ali-ons').Message; | ||
const producer = new Producer({ | ||
httpclient, | ||
accessKey: 'your-accesskey', | ||
@@ -64,0 +66,0 @@ secretKey: 'your-secretkey', |
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
137333
82
3904