Subject: bug#23982: [master] Treat errno EINPROGRESS and ENOTCONN as EAGAIN for async connection

From: Paul Eggert <[email-masked]>
Date: Tue, 26 Jul 2016 09:35:04 +0200

Thanks for the bug report and patch. Two thoughts:

* Passing GNUTLS_NONBLOCK to gnutls_init seems like a worthy change, but 
why does Emacs need to fiddle with an errno function? Surely GnuTLS 
should do the right thing with async connections, without Emacs having 
to insert a shim. Isn't this a bug in GnuTLS?

* The proposed patch uses gnutls_transport_set_errno_function, 
introduced in GnuTLS 2.12.0. Emacs master currently requires only GnuTLS 
2.6.6 or later. Would it be wise to bump the prerequisite version from 
2.6.6 to 2.12.0? I'll CC: this to Ted Zlanatov to see what he thinks.