Skip to content

Commit 0106792

Browse files
committed
Shrink the max-in-flight limit to reduce missed messages.
Signed-off-by: Katharine Berry <[email protected]>
1 parent ce3ea2f commit 0106792

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/pkjs/lib/message_queue.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
var MAX_BYTES_IN_FLIGHT = 600;
17+
var MAX_BYTES_IN_FLIGHT = 400;
1818

1919
function MessageQueue() {
2020
this.queue = [];
@@ -62,7 +62,7 @@ MessageQueue.prototype.enqueue = function(message) {
6262
this.log.push(message);
6363
}
6464
this.queue.push(message);
65-
if (this.messagesInFlight < 10 && this.bytesInFlight < MAX_BYTES_IN_FLIGHT) {
65+
if (this.messagesInFlight < 6 && this.bytesInFlight < MAX_BYTES_IN_FLIGHT) {
6666
console.log('sending immediately, messages in flight: ' + this.messagesInFlight + ', bytes in flight: ' + this.bytesInFlight);
6767
this.dequeue();
6868
} else {

0 commit comments

Comments
 (0)