diff options
| author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2026-05-21 22:49:15 +0200 |
|---|---|---|
| committer | Sander Vrijders <sander@ouroboros.rocks> | 2026-05-22 08:13:50 +0200 |
| commit | 5d0cf67a38695ebe65a0506b5c6d6c0d229a3b3e (patch) | |
| tree | 8b07956c2944ba48ef0fa2dc03fb0b0ee0a233cc /src/lib/dev.c | |
| parent | 3ad96a09df9dfd8e63e494887f7ef5bc07f244b5 (diff) | |
| download | ouroboros-5d0cf67a38695ebe65a0506b5c6d6c0d229a3b3e.tar.gz ouroboros-5d0cf67a38695ebe65a0506b5c6d6c0d229a3b3e.zip | |
lib: Add FIN and receive-side linger for msg deallocbe
qos_msg flows had no end-of-stream signal: a deallocating sender
relied on the peer's inactivity timers (~30 s) to notice. Worse, the
dealloc-linger path was bugged: a receiver that called flow_dealloc
would stop draining its rx_rb while the peer's tail retransmits kept
arriving. Peer retransmitted into a black hole until its own dealloc
fired, and the whole shutdown stretched takes t_a time.
Generalizes frcti_stream_fin_snd to frcti_fin_snd; for msg mode emit a
FRCT_FIN-only control packet with the FIN seqno boundary in
pci->ackno. Receiver-side frcti_rcv latches rcv_fin_seen and stores
the boundary on FRCT_FIN-without-DATA.
Fix comment on the FRCT flags.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib/dev.c')
| -rw-r--r-- | src/lib/dev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c index 13c7544b..ae0401b7 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -1342,10 +1342,10 @@ int fccntl(int fd, new_acc = flow->oflags & FLOWFACCMODE; /* Defer EOS emit until after proc.lock is dropped: */ - /* frcti_stream_fin_snd may block on shm-pool/tx-rb. */ + /* frcti_fin_snd may block on shm-pool/tx-rb. */ if (new_acc == FLOWFRDONLY && old_acc != FLOWFRDONLY - && FRCTI_IS_STREAM(flow->frcti)) + && flow->frcti != NULL) emit_eos = true; rx_acl = ssm_rbuff_get_acl(flow->rx_rb); @@ -1457,7 +1457,7 @@ int fccntl(int fd, pthread_rwlock_unlock(&proc.lock); if (emit_eos) - frcti_stream_fin_snd(flow->frcti); + frcti_fin_snd(flow->frcti); va_end(l); |
