Fixed crash in server

This commit is contained in:
WolverinDEV 2019-07-04 20:35:09 +02:00
parent 96d2ca28a8
commit 91ae593110
2 changed files with 9 additions and 3 deletions

View File

@ -204,12 +204,17 @@ void EventExecutor::_executor(ts::event::EventExecutor *loop) {
}
auto event_handler = linked_entry->entry.lock();
if(!event_handler) {
/* event handler passed away while waiting for beeing executed */
delete linked_entry;
continue;
}
sassert(event_handler->_event_ptr == linked_entry);
event_handler->_event_ptr = nullptr;
lock.unlock();
if(event_handler)
event_handler->event_execute(linked_entry->scheduled);
event_handler->event_execute(linked_entry->scheduled);
delete linked_entry;
}
}

View File

@ -33,4 +33,5 @@ name ##_timings.timings.push_back({step, std::chrono::system_clock::now()});
tp = entry.ts; \
} \
return result; \
})()
})()
/* FIX the "backslash-newline at end of file" warning */