aboutsummaryrefslogtreecommitdiffstats
path: root/src/assuan-buffer.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-11-07 16:20:19 +0000
committerWerner Koch <[email protected]>2014-11-07 16:20:19 +0000
commit1023508f210cd136992661c01b55b428de86a182 (patch)
tree95c6a0920e0a0a6d6cd0b47c3adc16929f72d17b /src/assuan-buffer.c
parentPost release updates (diff)
downloadlibassuan-1023508f210cd136992661c01b55b428de86a182.tar.gz
libassuan-1023508f210cd136992661c01b55b428de86a182.zip
w32: Remove I/O delays due to our 100ms delay after an EAGAIN.
* src/system-w32.c (__assuan_read): Retry using select. Map WSAECONNRESET to EPIPE. (__assuan_write): Retry using select. * src/assuan-buffer.c (readline) [W32]: Return EOF instead of EPIPE.
Diffstat (limited to 'src/assuan-buffer.c')
-rw-r--r--src/assuan-buffer.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/assuan-buffer.c b/src/assuan-buffer.c
index f2238e7..04aff5a 100644
--- a/src/assuan-buffer.c
+++ b/src/assuan-buffer.c
@@ -80,6 +80,15 @@ readline (assuan_context_t ctx, char *buf, size_t buflen,
{
if (errno == EINTR)
continue;
+#ifdef HAVE_W32_SYSTEM
+ if (errno == EPIPE)
+ {
+ /* Under Windows we get EPIPE (actually ECONNRESET)
+ after termination of the client. Assume an EOF. */
+ *r_eof = 1;
+ break; /* allow incomplete lines */
+ }
+#endif /*HAVE_W32_SYSTEM*/
return -1; /* read error */
}
else if (!n)