I've been running with this change - evhttp_detect_close_cb(int fd, short what, void *arg) { struct evhttp_connection *evcon = arg; - evhttp_connection_reset(evcon); + evhttp_connection_fail(evcon, EVCON_HTTP_EOF); }
I think that you said that a similar change caused a segmentation fault for you but I don't see how. If you remember can you send an email? Your suggested change will result in calling evhttp_connection_fail eventually as well - from the evhttp_write callback - since it will be the only one registered and it will fail since the connection got closed. But the close detection close does look like an unnecessary overhead and I'll try your suggestion as well. Thx --pv > -----Original Message----- > From: Niels Provos [mailto:pro...@gmail.com] > Sent: Friday, December 19, 2008 2:32 PM > To: Peter Vajgel > Cc: libevent-users@monkey.org > Subject: Re: [Libevent-users] http requests not freed by evhttp on > client timeout > > I have attached a patch to fix this by not running close detection on > servers. Severs already do this implicitly as they are waiting for > more data on persistent connections. The svn branch also contains a > test that makes sure that no connections are dangling on the server. > > Please, let me know if this works for you. > > Thanks, > Niels. _______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users