Skip to content
Browse files
Fix periodic latency spikes on Windows with WiFi connections. Closes #…
  • Loading branch information
sledgehammer999 committed Mar 27, 2016
1 parent c474810 commit c2b6e1ce1aa402b143d0154748c518a87bc6424a
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/app/main.cpp
@@ -215,6 +215,21 @@ int main(int argc, char *argv[])

#if defined(Q_OS_WIN) && defined(QBT_USES_QT5)
// This affects only Windows apparently and Qt5.
// When QNetworkAccessManager is instantiated it regularly starts polling
// the network interfaces to see what's available and their status.
// This polling creates jitter and high ping with wifi interfaces.
// So here we disable it for lack of better measure.
// It will also spew this message in the console: QObject::startTimer: Timers cannot have negative intervals
// For more info see:
// 1.
// 2.
// 3.

qputenv("QT_BEARER_POLL_TIMEOUT", QByteArray::number(-1));

if (!upgrade()) return EXIT_FAILURE;

0 comments on commit c2b6e1c

Please sign in to comment.