Comparing version
{ | ||
"name": "kafkajs", | ||
"version": "1.13.0-beta.14", | ||
"version": "1.13.0-beta.15", | ||
"description": "A modern Apache Kafka client for node.js", | ||
@@ -82,5 +82,5 @@ "author": "Tulio Ornelas <ornelas.tulio@gmail.com>", | ||
"kafkajs": { | ||
"sha": "c7ed777f2f213ef0317872ec0dad0603a2115c01", | ||
"compare": "https://github.com/tulios/kafkajs/compare/v1.12.0...c7ed777f2f213ef0317872ec0dad0603a2115c01" | ||
"sha": "2faef0719eeba50759eccc2b7d8800dbe63803f3", | ||
"compare": "https://github.com/tulios/kafkajs/compare/v1.12.0...2faef0719eeba50759eccc2b7d8800dbe63803f3" | ||
} | ||
} |
@@ -205,2 +205,6 @@ const Long = require('long') | ||
/** | ||
* @param {any[]} array | ||
* @param {'int32'|'number'|'string'|'object'} [type] | ||
*/ | ||
writeNullableArray(array, type) { | ||
@@ -213,2 +217,7 @@ // A null value is encoded with length of -1 and there are no following bytes | ||
/** | ||
* @param {any[]} array | ||
* @param {'int32'|'number'|'string'|'object'} [type] | ||
* @param {number} [length] | ||
*/ | ||
writeArray(array, type, length) { | ||
@@ -233,3 +242,2 @@ const arrayLength = length == null ? array.length : length | ||
switch (typeof value) { | ||
case 'int32': | ||
case 'number': | ||
@@ -236,0 +244,0 @@ this.writeInt32(value) |
@@ -42,6 +42,8 @@ const { format } = require('util') | ||
this[PRIVATE.WAITING].add(tryToAcquire) | ||
timeoutId = setTimeout( | ||
() => reject(new KafkaJSLockTimeout(this[PRIVATE.TIMEOUT_ERROR_MESSAGE]())), | ||
this[PRIVATE.TIMEOUT] | ||
) | ||
timeoutId = setTimeout(() => { | ||
// The message should contain the number of waiters _including_ this one | ||
const error = new KafkaJSLockTimeout(this[PRIVATE.TIMEOUT_ERROR_MESSAGE]()) | ||
this[PRIVATE.WAITING].delete(tryToAcquire) | ||
reject(error) | ||
}, this[PRIVATE.TIMEOUT]) | ||
}) | ||
@@ -48,0 +50,0 @@ } |
513197
0.07%15187
0.07%