Fix a problem with iface::cleanup() where 'it' was incremented improperly
This commit is contained in:
parent
0dbc3e288a
commit
b3e45caf20
@ -492,9 +492,10 @@ void iface::add_session(const ptr<session>& se)
|
||||
void iface::cleanup()
|
||||
{
|
||||
for (std::map<std::string, weak_ptr<iface> >::iterator it = _map.begin();
|
||||
it != _map.end(); it++) {
|
||||
if (!it->second) {
|
||||
_map.erase(it);
|
||||
it != _map.end(); ) {
|
||||
std::map<std::string, weak_ptr<iface> >::iterator c_it = it++;
|
||||
if (!c_it->second) {
|
||||
_map.erase(c_it);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -83,6 +83,8 @@ void route::load(const std::string& path)
|
||||
{
|
||||
_routes.clear();
|
||||
|
||||
logger::debug() << "reading routes";
|
||||
|
||||
try {
|
||||
std::ifstream ifs;
|
||||
ifs.exceptions(std::ifstream::badbit | std::ifstream::failbit);
|
||||
|
Loading…
x
Reference in New Issue
Block a user