File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -273,8 +273,10 @@ ServerBase::take_data()
273273{
274274 size_t next_ready_event = pimpl_->next_ready_event .exchange (ServerBaseImpl::NO_EVENT_READY);
275275
276- if (next_ready_event == ServerBaseImpl::NO_EVENT_READY;) {
277- throw std::runtime_error (" ServerBase::take_data() called but no data is ready" );
276+ if (next_ready_event == ServerBaseImpl::NO_EVENT_READY) {
277+ // there is a known bug in iron, that take_data might be called multiple
278+ // times. Therefore instead of throwing, we just return a nullptr as a workaround.
279+ return nullptr ;
278280 }
279281
280282 return take_data_by_entity_id (next_ready_event);
363365ServerBase::execute (std::shared_ptr<void > & data_in)
364366{
365367 if (!data_in) {
366- throw std::runtime_error (" ServerBase::execute: give data pointer was null" );
368+ // workaround, if take_data was called multiple timed, it returns a nullptr
369+ // normally we should throw here, but as an API stable bug fix, we just ignore this...
370+ return ;
367371 }
368372
369373 std::shared_ptr<ServerBaseData> data_ptr = std::static_pointer_cast<ServerBaseData>(data_in);
You can’t perform that action at this time.
0 commit comments