Adapt to mirage-flow 4 API (#70)
* mirage: avoid an assert false, properly return an error
* provide close and shutdown in Awa_mirage
* simplify - a shutdown \`read_write is a close
* mirage: preserve half-closed connections, and deal with them properly
* mirage: avoid assertions
* address @reynir review - and use inject_state
* mirage: revise close and shutdown
first to the ssh teardown, then do the underlying flow teardown
* shutdown: don't shutdown the flow unless closed
If we are in `Read_closed we may still want to read channel-close and
when we are in `Write_closed we may still want to write channel-close.
* mirage: set closed earlier in close(); also remove TODO comment
* mirage: add comment about states and why errors may occur that we ignore (thanks to @dinosaure)
* minor tweaks
* shutdown: if in closed/error state, call close on the underlying flow nevertheless
---------
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Co-authored-by: Romain Calascibetta <romain.calascibetta@gmail.com>
7c6613
-
Feb 08 11:45 +00:00