gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #107495] gnutls_bye() blocks on network issues


From: Howard Chu
Subject: [sr #107495] gnutls_bye() blocks on network issues
Date: Fri, 15 Oct 2010 08:46:37 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; rv:1.9.3a6pre) Gecko/20100708 Firefox 3.6

Follow-up Comment #5, sr #107495 (project gnutls):

Notice in the RFC section you referenced:

_ It is not required for the initiator
   of the close to wait for the responding close_notify alert before
   closing the read side of the connection._

Judging from the comments, it seems we should just use GNUTLS_SHUT_WR instead
of GNUTLS_SHUT_RDWR.


re: _Since openldap uses select you could use gnutls_bye with GNUTLS_SHUT_WR,
and once the socket is readable try to read
with gnutls_record_recv() which should return 0 (EOF). If it is not readable
within some time limit terminate the connection with error._

OpenLDAP only calls gnutls_bye during a session teardown, so the connection
is already being terminated. Nobody is going to be attempting to read anything
more from the socket at that point, there's no point in select'ing on it for
readability.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/support/?107495>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]