I am using RPC over SSL (Ocamlnet version 2.2.9 plus fixes for
ocaml-ssl 0.4 I found in the SVN repository). This works great, except
that when I shut down the server when there is an open connection from
a client, the server hangs in shutdown.
It seems that in uq_ssl.ml:start_shutting_down, we call
Ssl_exts.single_shutdown (i.e. SSL_shutdown), then
Ssl_exts.get_shutdown (i.e. SSL_get_shutdown) to see if we received
the close notify from the peer. If not we wait to read more data.
However for me this wait never succeeds.
The SSL_shutdown man page is a bit confusing as to what exactly is
supposed to happen--it seems to suggest that SSL_shutdown will return
an error if more data is needed, but that isn't happening for me. Also
it suggests that if the return is 0 we should call it again, but that
doesn't work (I just get 0 back a second time).
Any ideas? Thanks,
Get latest updates about Open Source Projects, Conferences and News.