Skip to content

Commit

Permalink
Do not buffer when there's no trusted streams available.
Browse files Browse the repository at this point in the history
  • Loading branch information
lsm committed Apr 13, 2016
1 parent 9df9a42 commit eb5e559
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/queue/gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ QueueGateway.prototype.onGatewayInf = function(pack, stream) {
// Route this message to one of any streams which has tag `[ns]::ACK`
var tag = prefixTags(meta[MNS], ACK)
var streams = this.socket.getStreamsByTag(tag, null, stream)
// console.log('ack trusted', pack);
this.one(streams, INF, ACK, ackMsg, meta)
if (streams.length > 0)
this.one(streams, INF, ACK, ackMsg, meta)
} else {
// If ACK from trusted streams, it could be one of following 2 cases:
if (meta[SID]) {
Expand Down Expand Up @@ -279,7 +279,6 @@ QueueGateway.prototype.dispatch = function(buf, stream) {
case INF:
pack = gateway.decode(buf)
pack.meta = meta
// console.log('gateway inf', pack);
gateway.onGatewayInf(pack, stream)
break
}
Expand Down

0 comments on commit eb5e559

Please sign in to comment.