Subject: Re: bug#32452: 26.1; gnutls_try_handshake maxes out cpu retrying when server is a bit busy

From: Eli Zaretskii <[email-masked]>
Date: Tue, 21 Aug 2018 05:42:05 +0300

> From: Noam Postavsky <[email-masked]>
> Cc: [email-masked]
> Date: Mon, 20 Aug 2018 20:52:58 -0400
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> nanosleep isn't portable though right?
> >
> > We could use usleep instead, it's part of Posix, AFAIK.  And MinGW has
> > it as well, AFAICT.  Sorry I didn't mention it in the first place.
> 
> My usleep(3) man page says it's obsolete:

Then I guess use nanosleep if it's available and usleep if it isn't?

Alternatively, we could make nanosleep fopr Windows using usleep, and
use nanosleep from Gnulib if platforms other than Windows don't have
it.