Hi I have an ssl server where clients are connecting, requesting whatever
they need then shutting down...

The problem I have is that some clients will not shut down correctly, so my
ssl server needs to handle the client disconnection.

They are two types of disconnections:

1) The client crashed and was not able to send a clean shutdown

In this case my ssl server needs to return whatever the resources that this
client was using.

2) The client did not crash and is still running but there is was some
network issue [a cable unplugged for example]

In this case my ssl server should not release the resources for that client
and show wait for it to reconnect once the network issue is solved.

The problem I have is that my ssl server is not able to distinguish between
the two situations. My SSL_read returns -1 in both cases... and a call to
SSL_get_error(m_ssl, r) returns ***SSL_ERROR_SYSCALL

*Is there a way I can distinguish between the two different situations?

Thanks a lot.