Skip to content

Commit

Permalink
Reset the IO context before starting
Browse files Browse the repository at this point in the history
- fixes reconnect bug where the context doesn't restart
  • Loading branch information
dvsku committed Jun 15, 2024
1 parent f826e4b commit 8a1bed7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/libnetwrk/net/core/shared/shared_context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ namespace libnetwrk {
}

void start_io_context() {
io_context.reset();

m_io_context_thread = std::thread([this] {
this->io_context.run();
});
Expand Down

0 comments on commit 8a1bed7

Please sign in to comment.