Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-06-14 00:55:21 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-06-14 22:40:08 +0300
commit2222f419da99ef85d49ab04e7e15b76612f4d054 (patch)
tree2c1190bb191d1c9659f1b2ed0c40c3a5fe13fcc8 /libavformat/tls_gnutls.c
parent91c8025c44ec126743d3e69d3758cc2ed742a336 (diff)
tls_gnutls: fix hang on disconnection
GNUTLS_SHUT_RDWR means GnuTLS will keep waiting for the server's termination reply. But since we don't shutdown the TCP connection at this point yet, GnuTLS will just keep skipping actual data from the server, which basically is perceived as hang. Use GNUTLS_SHUT_WR instead, which doesn't have this problem. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/tls_gnutls.c')
-rw-r--r--libavformat/tls_gnutls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c
index 942ece97ed..6388f37a8e 100644
--- a/libavformat/tls_gnutls.c
+++ b/libavformat/tls_gnutls.c
@@ -87,7 +87,7 @@ static int tls_close(URLContext *h)
{
TLSContext *c = h->priv_data;
if (c->need_shutdown)
- gnutls_bye(c->session, GNUTLS_SHUT_RDWR);
+ gnutls_bye(c->session, GNUTLS_SHUT_WR);
if (c->session)
gnutls_deinit(c->session);
if (c->cred)