From 18db3b4c00a29305dcb371b2617e4c65c3865ac5 Mon Sep 17 00:00:00 2001 From: Matthieu Monsch Date: Sun, 12 Mar 2017 12:16:05 -0700 Subject: [PATCH] Tweak channel buffering. --- lib/services.js | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/services.js b/lib/services.js index 29cd9168..b3fbe777 100644 --- a/lib/services.js +++ b/lib/services.js @@ -603,6 +603,9 @@ Client.prototype._emitMessage$ = function (wreq, opts, cb) { if (this._buffering$) { debug('no active client channels, buffering call'); this.once('channel', function () { + // We restrict buffering to startup, otherwise we risk silently + // hiding errors (especially since channel timeouts don't apply yet). + this._buffering$ = false; this._emitMessage$(wreq, opts, cb); }); } else { diff --git a/package.json b/package.json index a06219b0..a0cf5922 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "avsc", - "version": "5.0.0-rc.23", + "version": "5.0.0-rc.24", "description": "Avro for JavaScript", "homepage": "https://github.com/mtth/avsc", "keywords": [