quic: fix stream tx_fifo race condition 54/23754/4
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>
Tue, 3 Dec 2019 14:08:27 +0000 (15:08 +0100)
committerDave Wallace <dwallacelf@gmail.com>
Wed, 4 Dec 2019 18:08:51 +0000 (18:08 +0000)
Type: fix

There is a race condition in when receiving TX from
a client application :
As egress_emit writes as much data as possible to
the stream, if during egress_emit the app writes
to the fifo, the data will be directly passed to
quicly. Then TX callback happens and triggers
a scheduler update telling quilcy the stream has
data to send. When the next egress_emit is called
and no more data has come, we have nothing to write,
we return len = 0 to quicly which breaks an assert if
a loss happens later on.

Change-Id: I47e00a14dfc9068b5dac7b5c090a89124aea004f
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>

No differences found