Skip to content

Commit

Permalink
wip(broker)
Browse files Browse the repository at this point in the history
  • Loading branch information
bouda1 committed Oct 17, 2023
1 parent ca41797 commit c3973ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions broker/core/src/processing/feeder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ void feeder::_read_from_stream_timer_handler(
std::shared_ptr<io::data> event;
std::chrono::system_clock::time_point timeout_read =
std::chrono::system_clock::now() + std::chrono::milliseconds(100);
std::unique_lock<std::timed_mutex> l(_protect);
try {
std::unique_lock<std::timed_mutex> l(_protect);
if (_state != state::running)
return;
while (std::chrono::system_clock::now() < timeout_read &&
Expand Down Expand Up @@ -413,22 +413,22 @@ void feeder::_read_from_stream_timer_handler(
SPDLOG_LOGGER_INFO(log_v2::processing(), "feeder '{}', connection closed",
_name);
_muxer->write(events_to_publish);
stop();
_stop_no_lock();
return;
} catch (const std::exception& e) {
set_last_error(e.what());
SPDLOG_LOGGER_ERROR(log_v2::processing(),
"from client feeder '{}' error:{} ", _name, e.what());
_muxer->write(events_to_publish);
stop();
_stop_no_lock();
return;
} catch (...) {
SPDLOG_LOGGER_ERROR(log_v2::processing(),
"from client feeder: unknown error occured while "
"processing client '{}'",
_name);
_muxer->write(events_to_publish);
stop();
_stop_no_lock();
return;
}
_muxer->write(events_to_publish);
Expand Down

0 comments on commit c3973ff

Please sign in to comment.