Fix TLS connections on MS-Windows
commit9295d0a8c2078e5b85bc81b1f020cc73793767df
authorEli Zaretskii <eliz@gnu.org>
Sun, 28 Feb 2016 16:44:50 +0000 (28 18:44 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sun, 28 Feb 2016 16:44:50 +0000 (28 18:44 +0200)
treee6fa5e45bb97e6d9312fff80fd42f9e059897236
parentcd6067965761ccf31c48a106596b5187e85120e1
Fix TLS connections on MS-Windows

* src/w32.c (sys_write): If 'send' returns with WSAENOTCONN, and
this is a non-blocking socket whose connection is in progress, set
errno to EWOULDBLOCK, as expected by GnuTLS and other callers.
Avoid overwriting the errno value from 'send' by 'ioctlsocket'.
Suggested by Alain Schneble <a.s@realize.ch>.  (Bug#22789)
src/w32.c