Index: camel/ChangeLog
===================================================================
--- camel/ChangeLog	(revision 10191)
+++ camel/ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2009-03-27  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #569700
+
+	* camel-http-stream.c: (stream_read):
+	Disconnect properly on a failure.
+
 2009-03-12  Matthew Barnes  <mbarnes@redhat.com>
 
 	* camel-db.c:
Index: camel/camel-http-stream.c
===================================================================
--- camel/camel-http-stream.c	(revision 10191)
+++ camel/camel-http-stream.c	(working copy)
@@ -425,14 +425,20 @@ stream_read (CamelStream *stream, char *
 		if (http_connect (http, http->proxy ? http->proxy : http->url) == NULL)
 			return -1;
 		
-		if (http_method_invoke (http) == -1)
+		if (http_method_invoke (http) == -1) {
+			http_disconnect(http);
 			return -1;
+		}
 		
-		if (http_get_statuscode (http) == -1)
+		if (http_get_statuscode (http) == -1) {
+			http_disconnect(http);
 			return -1;
+		}
 		
-		if (http_get_headers (http) == -1)
+		if (http_get_headers (http) == -1) {
+			http_disconnect(http);
 			return -1;
+		}
 		
 		switch (http->statuscode) {
 		case 200:
