[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] Bug in libevent > 1.4.8 with evhttp_connection_set_closecb()
- To: libevent-users@xxxxxxxx
- Subject: [Libevent-users] Bug in libevent > 1.4.8 with evhttp_connection_set_closecb()
- From: Mark Fletcher <markf@xxxxxxxxxxxxx>
- Date: Tue, 20 Oct 2009 16:26:18 -0700
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Tue, 20 Oct 2009 19:31:41 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=aUDJtDUhSTDjuZgjASa4aW6ZDbhUxS1fQCz6Bz9chfM=; b=JAoC/qdjJyh6ls/3hxKaoX4Tz0KyjO/JWxFXts2c4bpQLPGli+4kx1oiFQAIZZ+I81 tvXi488GNRqVfrY36AnEU1OXWGoY0QSLOfP2HHXcUdIGwSf8XM5BKuNgmgYlLGKHM/Gx 5QxJwFa4uAo5NIhYmOUjJX++m2gj5+V29P8QA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:date:x-google-sender-auth:message-id :subject:from:to:content-type; b=PBP4gDGAQF4g8Zs+jxPjupFlWQiZWG0YU+gQEhj5/OvO2KHo1Q2WsIPbMkMgGtkWOz 5CsiXmGFuL8Qmf77rpmokt1b567iKiPVyAL8UzoWtrVbh2u2b5WwSjJ8fEVHBcLzU1B2 EXc4iyrXqsDg6eIod/6CTf8bg09dvxtkqj/g4=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
It appears that evhttp_connection_set_closecb() is never called in libevent versions > 1.4.8, because evhttp_connection_start_detectclose() was removed from the evhttp_send_reply() and evhttp_send_reply_start() functions. I believe this is referenced in the ChangeLog as "Fix a memory leak by not running explicit close detection for server connections" but that's just a guess on my part. Adding back the calls to libevent 1.4.12 causes the closecb callback to be invoked as expected.
Does adding back these calls result in a memory leak? Is there another way to get the functionality of evhttp_connection_set_closecb()?
Thanks,
Mark