Recheck WHC for unacked data just before blocking
A writer blocking on a full WHC will still send out whatever it has buffered but not sent yet. For this, the writer lock must be released, but that means an ACK can sneak in between sending out the packet and relocking the writer (not likely if there's a real network in between, but over a loopback interface it is definitely possible). Therefore, the amount of unacknowledged data that controls the blocking and triggering of it must be refreshed before deciding to block, otherwise it may hang indefinitely. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
9743bda57b
commit
2e9685221a
1 changed files with 2 additions and 1 deletions
|
@ -976,6 +976,7 @@ static os_result throttle_writer (struct nn_xpack *xp, struct writer *wr)
|
|||
}
|
||||
nn_xpack_send (xp, true);
|
||||
os_mutexLock (&wr->e.lock);
|
||||
whc_get_state (wr->whc, &whcst);
|
||||
}
|
||||
|
||||
while (gv.rtps_keepgoing && !writer_may_continue (wr, &whcst))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue