Skip to content
Snippets Groups Projects
Commit 74ea1167 authored by wm4's avatar wm4 Committed by Martin Storsjö
Browse files

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: default avatarMartin Storsjö <martin@martin.st>
parent 3b73d5c9
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment