0.4.0
Listener robustness + TLS regression guard. The server listener no longer dies when the process that called h2:start_server/2 exits, which broke test helpers and init callbacks spinning up short-lived listeners.
Added
h2_app/h2_sup/h2_listener:h2is now a proper OTP application with a top-levelsimple_one_for_onesupervisor for per-server listeners. Server listeners live under the application supervision tree instead of being linked to the caller ofh2:start_server/2.- CT regression
tls_transport_tag_detected_testinh2_compliance_SUITE: assertsh2_connectionclassifies the TLS socket asssl(notgen_tcp) after connect, so any future drift in OTP'ssslsockettuple shape is caught early.
Changed
- Breaking:
h2:start_server/2now requires theh2application to be started (application:ensure_started(h2)). Previously it worked from any process; now it registers a child underh2_sup. h2:stop_server/1sends a stop message to the listener process and lets it shut down the acceptor pool and close the listen socket under OTP supervision.
Fixed
wait_connected/1,2callers and the{h2, Conn, connected}owner event are now fired inline fromhandle_framewhen the first SETTINGS ack transitions the connection toconnected. Previously, if the same socket read buffer also contained a frame that caused a connection error,gen_statemwould enterclosingbefore theconnectedstate-enter callback ran and waiters would only see the teardown reply.closingstate-enter now replies to any still-queuedwait_connected/1,2callers with{error, ErrorCode}instead of leaving them to time out.closingstate-enter now half-closes the write side (shutdown(write)) and keeps reading to drain the recv buffer before the final close. A fullclose()with unread peer data was causing Linux to emit RST instead of FIN, which masked our GOAWAY on the h2spec oversized-frame case (4.2 / 2: Sends a large size DATA frame that exceeds SETTINGS_MAX_FRAME_SIZE).