eio,lwt,mirage: fix drain_handshake on Read_closed/Write_closed states
drain_handshake only returned early for `Active tls` when the handshake
was no longer in progress. `Read_closed` and `Write_closed` fell through
to the `| _ ->` branch, which called read_react — raising End_of_file
even though the handshake had completed successfully.
This can happen when the peer's Finished and close_notify arrive in the
same read batch, causing handle_tls to transition the state to
`Read_closed` before drain_handshake can check handshake_in_progress.
d8dcfa
-
Mar 14 15:35 +00:00