Should mean that we don't have to wait for the peer requests low water mark before we process chunks to cancel.
// Cancel pending requests for this chunk.
for c := range t.conns {
- c.updateRequests()
+ c.postCancel(req)
}
cl.mu.Unlock()
func (c *connection) tickleWriter() {
c.writerCond.Broadcast()
}
+
+func (c *connection) postCancel(r request) bool {
+ if !c.deleteRequest(r) {
+ return false
+ }
+ c.Post(makeCancelMessage(r))
+ return true
+}