mirror of
https://github.com/moparisthebest/imapfilter
synced 2024-12-21 23:28:49 -05:00
Fix the fatal failure caused by an SSL error
When a "Connection reset by peer" error was caused while reading through SSL, a restoration of the session should have taken place after all the connection related structures were resetted. But instead a silent, unexpected and unaccountable exit was the end result. This was caused by the underlying socket being closed while trying to shutdown the SSL session.
This commit is contained in:
parent
83e406b70e
commit
8c468f585f
@ -187,6 +187,8 @@ close_secure_connection(session *ssn)
|
||||
{
|
||||
|
||||
if (ssn->sslsocket) {
|
||||
SSL_set_shutdown(ssn->sslsocket, SSL_SENT_SHUTDOWN |
|
||||
SSL_RECEIVED_SHUTDOWN);
|
||||
SSL_shutdown(ssn->sslsocket);
|
||||
SSL_free(ssn->sslsocket);
|
||||
ssn->sslsocket = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user