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

Howard Chu INVALID.NOREPLY at gnu.org
Fri Oct 15 10:46:37 CEST 2010

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

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


Reply to this item at:


  Message sent via/by Savannah

More information about the Gnutls-devel mailing list