Fix unclean SSL disconnection

This patch prevent an infinite loop when the remote peer disconnect
the socket without cleanly closing the SSL connection.
Merge pull request #1957 from hardening/ssl_deco_fix

Fix unclean SSL disconnection