[gnutls-help] gnutls_handshake endlessly returning GNUTLS_E_AGAIN.

Nikos Mavrogiannopoulos nmav at gnutls.org
Sun Aug 16 09:11:43 CEST 2015


On Sat, Aug 15, 2015 at 12:11 AM, Max Bruce <max.bruce12 at gmail.com> wrote:
> I'm running GNUTLS 3.3.17, and it's working flawlessly, except for when I
> attempt STARTTLS. Right now, I'm just calling gnutls_handshake and then
> wrapping read/write with the GNUTLS gnutls_record_recv/gnutls_record_send.
> If I establish a connection it works fine. With STARTTLS, it just endlessly
> returns EAGAIN. I am running this in non blocking mode both at socket level
> & at GNUTLS level. It also takes a lot of CPU, but I can safely assume
> that's because I'm just mindlessly looping, and not running a select/poll,
> but first I'd like to make it work before I worry about that.

If you don't use select() to see if you have any data in queue, how do
you know that GNUTLS_E_AGAIN shouldn't have been returned?



More information about the Gnutls-help mailing list