diff options
Diffstat (limited to 'src/assuan-buffer.c')
-rw-r--r-- | src/assuan-buffer.c | 9 |
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) |