]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: mux-quic: define basic stream states
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 1 Jul 2022 14:48:42 +0000 (16:48 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 11 Jul 2022 14:37:21 +0000 (16:37 +0200)
commit38e6006da1f9fb76df798173600196d1d0649a6d
tree47a321813f800ae4772123152e0e0d94b889fc58
parentb68559a9aa869fec7c4886134e0723eac9ec4979
MINOR: mux-quic: define basic stream states

Implement a basic state machine to represent stream lifecycle. By
default a stream is idle. It is marked as open when sending or receiving
the first data on a stream.

Bidirectional streams has two states to represent the closing on both
receive and send channels. This distinction does not exists for
unidirectional streams which passed automatically from open to close
state.

This patch is mostly internal and has a limited visible impact. Some
behaviors are slightly updated :
* closed streams are garbage collected at the start of io handler
* send operation is interrupted if a stream is close locally

Outside of this, there is no functional change. However, some additional
BUG_ON guards are implemented to ensure that we do not conduct invalid
operation on a stream. This should strengthen the code safety. Also,
stream states are displayed on trace which should help debugging.
include/haproxy/mux_quic-t.h
src/mux_quic.c