From e4ad4462610eec508b97324c48557e77ecbd7b51 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 16 Feb 2012 02:51:46 +0900 Subject: [PATCH] Fixed busy loop: remove marked handler. --- examples/SpdyServer.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/SpdyServer.cc b/examples/SpdyServer.cc index 82f6ad4b..d9b82000 100644 --- a/examples/SpdyServer.cc +++ b/examples/SpdyServer.cc @@ -922,10 +922,14 @@ int SpdyServer::run() sessions.mod_poll(hd); } } + if(hd->mark_del()) { + del_list.push_back(hd); + } } for(std::vector::iterator i = del_list.begin(), eoi = del_list.end(); i != eoi; ++i) { on_close(sessions, *i); + sessions.remove_handler(*i); } del_list.clear(); }