fix: tear down SSL connection on read failure to force reconnect
This commit is contained in:
parent
7253d34983
commit
6005b5ca88
|
|
@ -205,6 +205,9 @@ static bool do_signed_request(rest_conn_t *rc,
|
|||
if (n <= 0) {
|
||||
int err = SSL_get_error(rc->ssl, n);
|
||||
if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) continue;
|
||||
/* Connection dead — tear down so next call reconnects */
|
||||
SSL_free(rc->ssl); rc->ssl = NULL;
|
||||
close(rc->fd); rc->fd = -1;
|
||||
break;
|
||||
}
|
||||
total += n;
|
||||
|
|
|
|||
Loading…
Reference in New Issue