rpc-ssl server not shutting down cleanly

"Jake Donham" <[email protected]> Fri, 24 Oct 2008 18:49:50 -0700
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <[email protected]>
Hi list,

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,

Jake

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/