diff options
| author | Darkelarious <github@333networks.com> | 2025-05-04 16:08:07 +0200 |
|---|---|---|
| committer | Darkelarious <github@333networks.com> | 2025-05-04 16:08:07 +0200 |
| commit | 8e1fdbe10862ccba3bdff2389c1bb732c6e84da4 (patch) | |
| tree | 7cbbb5984f8fc5676cd610c388952caa1226c286 /src | |
| parent | 10bd168b65766026ae47eb7619f9fe74ced75e16 (diff) | |
| download | Masterserver-Qt5-8e1fdbe10862ccba3bdff2389c1bb732c6e84da4.tar.gz Masterserver-Qt5-8e1fdbe10862ccba3bdff2389c1bb732c6e84da4.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/Core/version.h | 4 | ||||
| -rw-r--r-- | src/Database/initdatabase.cpp | 5 | ||||
| -rw-r--r-- | src/Protocols/GameSpy0/gamespy0.cpp | 4 | ||||
| -rw-r--r-- | src/TcpTasks/ListenClientHandler/listenclienthandler.h | 4 | ||||
| -rw-r--r-- | src/TcpTasks/SyncClient/syncclient.h | 2 | ||||
| -rw-r--r-- | src/TcpTasks/Updater/scheduleupdater.cpp | 2 | ||||
| -rw-r--r-- | src/TcpTasks/Updater/syncupdater.h | 2 |
7 files changed, 14 insertions, 9 deletions
diff --git a/src/Core/version.h b/src/Core/version.h index 5308bfc..10d204c 100644 --- a/src/Core/version.h +++ b/src/Core/version.h @@ -26,10 +26,10 @@ #define BUILD_TYPE QString("MasterServer Qt5") // software version (of this particular type) -#define BUILD_VERSION QString("0.27") +#define BUILD_VERSION QString("0.28") // short version (in query) -- Qt v0.n -#define SHORT_VER QString("Qt-" + BUILD_VERSION + "hf4") +#define SHORT_VER QString("Qt-" + BUILD_VERSION) // build time/date #define BUILD_TIME QStringLiteral("%1 %2").arg(__DATE__).arg(__TIME__) diff --git a/src/Database/initdatabase.cpp b/src/Database/initdatabase.cpp index c3b4823..fb99dfa 100644 --- a/src/Database/initdatabase.cpp +++ b/src/Database/initdatabase.cpp @@ -14,9 +14,10 @@ bool initDatabase(const QString applicationPath) return false; } - // speed up SQLite with keeping journals in memory and asynchronous writing + // SQLite tweaks with async, wal and timeout dbi.exec("PRAGMA synchronous = OFF"); - dbi.exec("PRAGMA journal_mode = MEMORY"); + dbi.exec("PRAGMA journal_mode = WAL"); // previous: MEMORY + dbi.exec("PRAGMA busy_timeout = 500"); // 500ms { // check if the database was generated with this version of the software diff --git a/src/Protocols/GameSpy0/gamespy0.cpp b/src/Protocols/GameSpy0/gamespy0.cpp index 6595d4a..64026b8 100644 --- a/src/Protocols/GameSpy0/gamespy0.cpp +++ b/src/Protocols/GameSpy0/gamespy0.cpp @@ -23,6 +23,10 @@ QMultiHash<QString, QString> parseGameSpy0Buffer(const QString &bufferString) // unify valid keys QString key = overrideKey( property.next().trimmed() ); + // skip empty key field (can happen after queryid) + if ( !key.length() ) + continue; + // see if a value for this key exists if ( ! property.hasNext() ) break; diff --git a/src/TcpTasks/ListenClientHandler/listenclienthandler.h b/src/TcpTasks/ListenClientHandler/listenclienthandler.h index 3c857fa..4259312 100644 --- a/src/TcpTasks/ListenClientHandler/listenclienthandler.h +++ b/src/TcpTasks/ListenClientHandler/listenclienthandler.h @@ -9,7 +9,7 @@ #include "Database/Common/commonactions.h" #include "Protocols/GameSpy0/gamespy0.h" -#include "protocols/enctype2.h" +#include "Protocols/enctype2.h" #include "Protocols/GameSpy0/securevalidate.h" class ListenClientHandler : public QObject @@ -20,7 +20,7 @@ public: QTcpSocket *tcpSocket); private: - const int _timeOutTime_ms = 7500; + const int _timeOutTime_ms = 15000; QSharedPointer<CoreObject> _coreObject; QScopedPointer<QTcpSocket> _tcpSocket; diff --git a/src/TcpTasks/SyncClient/syncclient.h b/src/TcpTasks/SyncClient/syncclient.h index 8cf253f..49f8155 100644 --- a/src/TcpTasks/SyncClient/syncclient.h +++ b/src/TcpTasks/SyncClient/syncclient.h @@ -20,7 +20,7 @@ public: private: QSharedPointer<CoreObject> _coreObject; - const int _timeOutTime_ms = 7500; + const int _timeOutTime_ms = 15000; // tcp client handles QTcpSocket _tcpSocket; diff --git a/src/TcpTasks/Updater/scheduleupdater.cpp b/src/TcpTasks/Updater/scheduleupdater.cpp index 7a96d6e..86a8f29 100644 --- a/src/TcpTasks/Updater/scheduleupdater.cpp +++ b/src/TcpTasks/Updater/scheduleupdater.cpp @@ -2,7 +2,7 @@ bool SyncUpdater::scheduleUpdater() { - // schedule sync X seconds apart (prevent network spikes) + // schedule sync X seconds apart (prevent network/cpu spikes) connect(&_syncTicker, &QTimer::timeout, this, &SyncUpdater::onSyncTickerAction); _syncTicker.setInterval( _graceTime_ms ); diff --git a/src/TcpTasks/Updater/syncupdater.h b/src/TcpTasks/Updater/syncupdater.h index 9bd2299..5d47317 100644 --- a/src/TcpTasks/Updater/syncupdater.h +++ b/src/TcpTasks/Updater/syncupdater.h @@ -17,7 +17,7 @@ public: private: QSharedPointer<CoreObject> _coreObject; - const int _graceTime_ms = 5000; + const int _graceTime_ms = 30000; // update/ticker timer QTimer _updaterTimer; |
