Skip to content

Commit

Permalink
Исправляем ошибку таймеров клиента и сервера
Browse files Browse the repository at this point in the history
  • Loading branch information
anyks committed Oct 5, 2024
1 parent 0b707d6 commit bf82e8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ void awh::client::Core::createTimeout(const uint64_t bid, const time_t msec) noe
// Выполняем блокировку потока
const lock_guard <recursive_mutex> lock(this->_mtx.receive);
// Выполняем создание нового таймаута
this->_timeouts.emplace(bid, (tid = this->_timer.timeout(msec)));
this->_receive.emplace(bid, (tid = this->_timer.timeout(msec)));
}
// Выполняем добавление функции обратного вызова
this->_timer.set <void (const uint64_t)> (tid, std::bind(static_cast <void (core_t::*)(const uint64_t)> (&core_t::close), this, bid));
Expand Down
2 changes: 1 addition & 1 deletion src/core/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ void awh::server::Core::createTimeout(const uint16_t sid, const uint64_t bid, co
// Выполняем блокировку потока
const lock_guard <recursive_mutex> lock(this->_mtx.receive);
// Выполняем создание нового таймаута
this->_timeouts.emplace(bid, (tid = this->_timer->timeout(msec)));
this->_receive.emplace(bid, (tid = this->_timer->timeout(msec)));
}
// Выполняем добавление функции обратного вызова
this->_timer->set <void (const uint64_t)> (tid, std::bind(static_cast <void (core_t::*)(const uint64_t)> (&core_t::close), this, bid));
Expand Down

0 comments on commit bf82e8c

Please sign in to comment.