Fixed crash in server
This commit is contained in:
parent
96d2ca28a8
commit
91ae593110
@ -204,12 +204,17 @@ void EventExecutor::_executor(ts::event::EventExecutor *loop) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto event_handler = linked_entry->entry.lock();
|
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);
|
sassert(event_handler->_event_ptr == linked_entry);
|
||||||
event_handler->_event_ptr = nullptr;
|
event_handler->_event_ptr = nullptr;
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
|
|
||||||
if(event_handler)
|
event_handler->event_execute(linked_entry->scheduled);
|
||||||
event_handler->event_execute(linked_entry->scheduled);
|
|
||||||
delete linked_entry;
|
delete linked_entry;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -33,4 +33,5 @@ name ##_timings.timings.push_back({step, std::chrono::system_clock::now()});
|
|||||||
tp = entry.ts; \
|
tp = entry.ts; \
|
||||||
} \
|
} \
|
||||||
return result; \
|
return result; \
|
||||||
})()
|
})()
|
||||||
|
/* FIX the "backslash-newline at end of file" warning */
|
Loading…
x
Reference in New Issue
Block a user