mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-16 19:14:41 -07:00
Merge pull request #900 from nats-io/fix_budget_flush
Fixed use of flush budget for connections other than ROUTER
This commit is contained in:
@@ -721,10 +721,11 @@ func (c *client) readLoop() {
|
||||
|
||||
// Budget to spend in place flushing outbound data.
|
||||
// Client will be checked on several fronts to see
|
||||
// if applicable. Routes will never wait in place.
|
||||
budget := time.Millisecond
|
||||
if c.kind == ROUTER {
|
||||
budget = 0
|
||||
// if applicable. Routes and Gateways will never
|
||||
// wait in place.
|
||||
var budget time.Duration
|
||||
if c.kind == CLIENT {
|
||||
budget = time.Millisecond
|
||||
}
|
||||
|
||||
// Check pending clients for flush.
|
||||
|
||||
Reference in New Issue
Block a user