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 ([EMAIL PROTECTED])

-- 
Robert Millan

ACK STORM, S.L.  -  http://www.ackstorm.es
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",

Reply via email to