changeset 7348:32d555a08443 HEAD

If stream is closed without stream_errno set, change it to ECONNRESET so if there are any future reads they'll return it.
author Timo Sirainen <tss@iki.fi>
date Wed, 05 Mar 2008 02:03:50 +0200
parents 34cc59e3da17
children 63ef0998cd53
files src/lib/istream.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/istream.c	Wed Mar 05 02:03:10 2008 +0200
+++ b/src/lib/istream.c	Wed Mar 05 02:03:50 2008 +0200
@@ -49,6 +49,9 @@
 {
 	io_stream_close(&stream->real_stream->iostream);
 	stream->closed = TRUE;
+
+	if (stream->stream_errno == 0)
+		stream->stream_errno = ECONNRESET;
 }
 
 void i_stream_set_max_buffer_size(struct istream *stream, size_t max_size)