Fixed busy loop: remove marked handler.
This commit is contained in:
parent
85ec883d11
commit
e4ad446261
|
@ -922,10 +922,14 @@ int SpdyServer::run()
|
||||||
sessions.mod_poll(hd);
|
sessions.mod_poll(hd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(hd->mark_del()) {
|
||||||
|
del_list.push_back(hd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for(std::vector<EventHandler*>::iterator i = del_list.begin(),
|
for(std::vector<EventHandler*>::iterator i = del_list.begin(),
|
||||||
eoi = del_list.end(); i != eoi; ++i) {
|
eoi = del_list.end(); i != eoi; ++i) {
|
||||||
on_close(sessions, *i);
|
on_close(sessions, *i);
|
||||||
|
sessions.remove_handler(*i);
|
||||||
}
|
}
|
||||||
del_list.clear();
|
del_list.clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue