[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gnutls] gnutls_bye(), return values, and looping
From: |
Nikos Mavroyanopoulos |
Subject: |
Re: [Help-gnutls] gnutls_bye(), return values, and looping |
Date: |
Sun, 1 Feb 2004 22:09:25 +0200 |
User-agent: |
Internet Messaging Program (IMP) 3.2.2 |
Quoting Joe Shaw <address@hidden>:
> Hi,
>
> I am a little confused about how exactly to handle the return values
> from gnutls_bye(). I have some code which does the following:
>
> do {
> ret = gnutls_bye (chan->session, GNUTLS_SHUT_RDWR);
> } while (ret == GNUTLS_E_INTERRUPTED ||
> ret == GNUTLS_E_AGAIN);
>
> In almost every case, this works out just fine, and I can close the file
> descriptor after that.
> I'm running into a problem on one of our test machines, though, that
> gnutls_bye() always returns GNUTLS_E_AGAIN, causing an infinite loop and
> using 100% CPU.
[...]
> Perhaps more importantly, is there any steadfast reason why it'd always
> return AGAIN? Could it be a bug in GnuTLS that removing my do-while
> would really just be papering over? Any info would be helpful.
GNUTLS_E_AGAIN is returned because the underlying layer (recv or send)
returned EAGAIN. gnutls does not use this error value.
> Thanks,
> Joe
--
address@hidden
- Re: [Help-gnutls] gnutls_bye(), return values, and looping,
Nikos Mavroyanopoulos <=