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()
|
void iface::cleanup()
|
||||||
{
|
{
|
||||||
for (std::map<std::string, weak_ptr<iface> >::iterator it = _map.begin();
|
for (std::map<std::string, weak_ptr<iface> >::iterator it = _map.begin();
|
||||||
it != _map.end(); it++) {
|
it != _map.end(); ) {
|
||||||
if (!it->second) {
|
std::map<std::string, weak_ptr<iface> >::iterator c_it = it++;
|
||||||
_map.erase(it);
|
if (!c_it->second) {
|
||||||
|
_map.erase(c_it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,6 +83,8 @@ void route::load(const std::string& path)
|
|||||||
{
|
{
|
||||||
_routes.clear();
|
_routes.clear();
|
||||||
|
|
||||||
|
logger::debug() << "reading routes";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
std::ifstream ifs;
|
std::ifstream ifs;
|
||||||
ifs.exceptions(std::ifstream::badbit | std::ifstream::failbit);
|
ifs.exceptions(std::ifstream::badbit | std::ifstream::failbit);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user