[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] evhttp, evhttp_send_reply_start and client close
- To: libevent-users@xxxxxxxxxxxxx
- Subject: [Libevent-users] evhttp, evhttp_send_reply_start and client close
- From: Vincent Bernat <bernat@xxxxxxxx>
- Date: Sun, 12 Aug 2012 11:02:11 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Sun, 12 Aug 2012 05:10:27 -0400
- Dkim-signature: v=1; a=rsa-sha1; c=simple; d=luffy.cx; h=from:to:subject :date:message-id:mime-version:content-type; s=postfix; bh=VU5Uei BOQqcZ5FuRIzK7HTAuPRo=; b=hYlUX8hgVxaIpBmpBNyBAEqlBgaANLjbvHOnuG rka65V6P+f5hjrl4gKquocbu2OlvFsaCWwgU+IBQUH88IpUTSGnEezUF1MB2I4no a/im7z6EqWS3hgHH3IFaYR+usz+zOvpQn7ZNdzNhr3hShWnYNEHk7A+ARjrCEbra 4Forg=
- Domainkey-signature: a=rsa-sha1; c=simple; d=luffy.cx; h=from:to:subject :date:message-id:mime-version:content-type; q=dns; s=postfix; b= g97dxh/9LrvRMeueGXX/AXHhNOLksnDg/xJTl5POi3eBOL7uzEPZs1OiQal7AbJj wgTgETdgCNvMxybBxVpmohqCP+W97igYofWquUqDyRkIJhuTS0L0x8i/I4Ywfotq MPy7PZiN/O3BFTXmjPp1RygNIxT85To71bTcF/ALdGc=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
- User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (gnu/linux)
Hi!
I am trying to use HTTP chunked answers to implement a publish/subscribe
mechanism on top of evhttp. A client will subscribe to a topic by
requesting some URL, I invoke evhttp_send_reply_start(), put the request
into some list and once a message is available for a topic, I take my
list and for each member, I will send the new messages with
evhttp_send_reply_chunk().
My question is: how do I handle the case where the client disconnects? I
have found a similar problem in this post:
http://archives.seul.org/libevent/users/Jan-2010/msg00054.html
The linked gist does not crash anymore but, in my case, I need to remove
the "dead" clients from my linked list (or I will soon run into some
memory issue).
--
panic("huh?\n");
2.2.16 /usr/src/linux/arch/i386/kernel/smp.c
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.