[Pkg-gnutls-maint] Bug#386530: sits waiting for server reponse in
socket_bye
Robert Millan [ackstorm]
rmillan at ackstorm.es
Fri Sep 8 09:34:09 UTC 2006
Package: gnutls-bin
Severity: normal
Tags: patch upstream
Some servers (e.g. IIS) don't send a reply to gnutls_bye's close request. This
causes socket_bye to sit waiting for input from peer that never comes.
Since socket_bye is going to close the connection, we don't need to wait for
it anyway. My attached patch replaces GNUTLS_SHUT_RDWR with GNUTLS_SHUT_WR,
which seems to archieve that.
Note: this patch has already been sent to upstream (bug-gnutls at gnu.org)
--
Robert Millan
ACK STORM, S.L. - http://www.ackstorm.es
-------------- next part --------------
diff -ur gnutls13-1.4.2.old/src/cli.c gnutls13-1.4.2/src/cli.c
--- gnutls13-1.4.2.old/src/cli.c 2006-07-10 23:09:45.000000000 +0200
+++ gnutls13-1.4.2/src/cli.c 2006-09-08 11:02:52.000000000 +0200
@@ -1084,7 +1084,7 @@
if (socket->secure)
{
do
- ret = gnutls_bye (socket->session, GNUTLS_SHUT_RDWR);
+ ret = gnutls_bye (socket->session, GNUTLS_SHUT_WR);
while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN);
if (ret < 0)
fprintf (stderr, "*** gnutls_bye() error: %s\n",
More information about the Pkg-gnutls-maint
mailing list