Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions server/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1642,8 +1642,10 @@ func (c *client) flushOutbound() bool {
}
consumed := len(wnb)

// Actual write to the socket.
nc.SetWriteDeadline(start.Add(wdl))
// Actual write to the socket. The deadline applies to each batch
// rather than the total write, such that the configured deadline
// can be tuned to a known maximum quantity (64MB).
nc.SetWriteDeadline(time.Now().Add(wdl))
wn, err = wnb.WriteTo(nc)
nc.SetWriteDeadline(time.Time{})

Expand Down