Added inverse, fixing server bug

This commit is contained in:
Vladislav Khorev committed 2026-03-10 11:38:16 +03:00
1 parent 785b96ce82
commit c88784a669
4 files changed
+59 -9

No files matched your search

+2 -2
View File
@@ -125,8 +125,6 @@ void Session::sendBoxesToClient() {
void Session::init()
{
sendBoxesToClient();
auto timer = std::make_shared<net::steady_timer>(ws_.get_executor());
timer->expires_after(std::chrono::milliseconds(100));
timer->async_wait([self = shared_from_this(), timer](const boost::system::error_code& ec) {
@@ -135,6 +133,8 @@ void Session::init()
uint64_t now_ms = static_cast<uint64_t>(
std::chrono::duration_cast<std::chrono::milliseconds>(now_tp.time_since_epoch()).count());
self->sendBoxesToClient();
self->send_message("ID:" + std::to_string(self->id_) + ":" + std::to_string(now_ms));
self->do_read();
}