[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] evhttp, evhttp_send_reply_start and client close



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.