If a request times out, the evcon->output_buffer isn't cleared. Thus, on the 
next connection using the same connection handle, the output buffer is flushed, 
causing a very confusing state!

Simple patch:

$ diff -u http-old.c http.c
--- http-old.c    2009-01-10 21:59:38.000000000 -0500
+++ http.c    2009-01-10 22:01:07.000000000 -0500
@@ -1132,6 +1132,8 @@
         evcon->fd = -1;
     }
     evcon->state = EVCON_DISCONNECTED;
+    evbuffer_drain(evcon->input_buffer, EVBUFFER_LENGTH(evcon->input_buffer));
+    evbuffer_drain(evcon->output_buffer, 
EVBUFFER_LENGTH(evcon->output_buffer));
 }

 static void
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to