Skip to content

Commit

Permalink
Fix CPU core maxing out, esp. on Linux and bump version for hotfix (#350
Browse files Browse the repository at this point in the history
)

* fix CPU usage spike

* remove accidentally included change from other branch
  • Loading branch information
in1tiate authored Apr 6, 2024
1 parent 7bbf3aa commit 3e11978
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion akashi/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
QCoreApplication::setApplicationName("akashi");
QCoreApplication::setApplicationVersion("honeydew (1.8)");
QCoreApplication::setApplicationVersion("honeydew hotfix (1.8.1)");
std::atexit(cleanup);

// Verify server configuration is sound.
Expand Down
1 change: 1 addition & 0 deletions core/src/area_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ bool AreaData::isShoutAllowed() const
void AreaData::startMessageFloodguard(int f_duration)
{
m_can_send_ic_messages = false;
m_message_floodguard_timer->setSingleShot(true);
m_message_floodguard_timer->start(f_duration);
}

Expand Down
1 change: 1 addition & 0 deletions core/src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ void Server::start()

// Rate-Limiter for IC-Chat
m_message_floodguard_timer = new QTimer(this);
m_message_floodguard_timer->setSingleShot(true);
connect(m_message_floodguard_timer, &QTimer::timeout, this, &Server::allowMessage);

// Prepare player IDs and reference hash.
Expand Down

0 comments on commit 3e11978

Please sign in to comment.