Commit 8d37ba8
committed
DPL: update what "now" means before setting the timer
Due to the fact we do not invoke uv_run unless there is
some idle time between some data and the other, the concept
of "now" in libuv is not updated. This means that when
we setup a timer, libuv thinks it's still the past. However
when we run uv_run e.g. because data is not
arriving anymore, the time suddenly switches to the correct one,
triggering the callback immediately, because the 20 seconds from
the moment in the past have already passed.
This explains why end of stream is missed (FairMQ simply switched
already to the READY state) or why some race condition which should not
be so frequent (like the one for START-STOP-START), is so frequent.1 parent 6e19e74 commit 8d37ba8
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
545 | 546 | | |
546 | 547 | | |
547 | 548 | | |
| |||
779 | 780 | | |
780 | 781 | | |
781 | 782 | | |
| 783 | + | |
782 | 784 | | |
783 | 785 | | |
784 | 786 | | |
| |||
0 commit comments