diff options
| author | 2014-03-13 02:40:02 +0100 | |
|---|---|---|
| committer | 2014-03-13 02:40:02 +0100 | |
| commit | bafe6a9e7255e7946ef234f0a91de772ff9df395 (patch) | |
| tree | 05d268d53b1756815fe76f11ff691d78723f3370 /src | |
| parent | e3b45399e1e897c70195a424113552c4cc2b16c4 (diff) | |
| download | libimobiledevice-bafe6a9e7255e7946ef234f0a91de772ff9df395.tar.gz libimobiledevice-bafe6a9e7255e7946ef234f0a91de772ff9df395.tar.bz2 | |
idevice: call SSL_shutdown a second time if required
This will fix that:
lockdownd[25] <Notice>: 00484000 _receive_message: Could not receive size of message, expected 4 bytes, got -1 bytes: (54, Connection reset by peer)
Diffstat (limited to 'src')
| -rw-r--r-- | src/idevice.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/idevice.c b/src/idevice.c index 5fa2e85..d01aa8f 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
| @@ -820,7 +820,10 @@ idevice_error_t idevice_connection_disable_ssl(idevice_connection_t connection) | |||
| 820 | 820 | ||
| 821 | #ifdef HAVE_OPENSSL | 821 | #ifdef HAVE_OPENSSL |
| 822 | if (connection->ssl_data->session) { | 822 | if (connection->ssl_data->session) { |
| 823 | SSL_shutdown(connection->ssl_data->session); | 823 | /* see: https://www.openssl.org/docs/ssl/SSL_shutdown.html#RETURN_VALUES */ |
| 824 | if (SSL_shutdown(connection->ssl_data->session) == 0) { | ||
| 825 | SSL_shutdown(connection->ssl_data->session); | ||
| 826 | } | ||
| 824 | } | 827 | } |
| 825 | #else | 828 | #else |
| 826 | if (connection->ssl_data->session) { | 829 | if (connection->ssl_data->session) { |
