A badly-behaved client could send Shutdown after Close, for example if the Proxy.proxy function in vpnkit throws an exception for one of the directions, the function will return and the Lwt.finalize will call close. Some time later the other copy will finish and call close_write which will send a Shutdown message.
This PR avoids sending Shutdown messages after Close. We already covered the case of sending Data or Close messages after Close.
A badly-behaved client could send Shutdown after Close, for example if the Proxy.proxy function in
vpnkit
throws an exception for one of the directions, the function will return and theLwt.finalize
will callclose
. Some time later the other copy will finish and callclose_write
which will send a Shutdown message.This PR avoids sending Shutdown messages after Close. We already covered the case of sending Data or Close messages after Close.