diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2012-06-14 20:49:07 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2012-06-14 20:49:07 +0200 |
commit | ba122b9354e1556171ec3c10706c73ff19a7b347 (patch) | |
tree | 08afc288cfcb1d4b43387e659afcee5ee56619ef /src/libwaitress | |
parent | efa919fc80b388b38045da79a513ba9dd9f0b4c5 (diff) | |
download | pianobar-windows-ba122b9354e1556171ec3c10706c73ff19a7b347.tar.gz pianobar-windows-ba122b9354e1556171ec3c10706c73ff19a7b347.tar.bz2 pianobar-windows-ba122b9354e1556171ec3c10706c73ff19a7b347.zip |
waitress: Send TLS bye only if connect was successful
Diffstat (limited to 'src/libwaitress')
-rw-r--r-- | src/libwaitress/waitress.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libwaitress/waitress.c b/src/libwaitress/waitress.c index c98a55e..ee2926b 100644 --- a/src/libwaitress/waitress.c +++ b/src/libwaitress/waitress.c @@ -1098,11 +1098,13 @@ WaitressReturn_t WaitressFetchCall (WaitressHandle_t *waith) { if ((wRet = WaitressSendRequest (waith)) == WAITRESS_RET_OK) { wRet = WaitressReceiveResponse (waith); } + if (waith->url.tls) { + gnutls_bye (waith->request.tlsSession, GNUTLS_SHUT_RDWR); + } } /* cleanup */ if (waith->url.tls) { - gnutls_bye (waith->request.tlsSession, GNUTLS_SHUT_RDWR); gnutls_deinit (waith->request.tlsSession); gnutls_certificate_free_credentials (waith->tlsCred); } |