forked from bip/bip
1
0
Fork 0

Close descriptor when SSL reports a system error.

Avoids leaking fd when connections are closed abruptly.
This commit is contained in:
Arnaud Cornet 2018-12-09 14:27:59 -05:00 committed by Pierre-Louis Bonicoli
parent 513a6582ad
commit caf979a4c5
Signed by untrusted user: pilou
GPG Key ID: ADC2651DDACD3538
1 changed files with 2 additions and 1 deletions

View File

@ -1493,7 +1493,8 @@ static int SSLize(connection_t *cn, int *nc)
}
if (err2 == SSL_ERROR_SYSCALL) {
/* socked died */
mylog(LOG_ERROR, "Error with socket during ssl handshake.");
connection_close(cn);
cn->connected = CONN_ERROR;
return 1;
}