Skip to content

Commit

Permalink
socket_client: reduce kMaxNoDataRetry for Windows OS
Browse files Browse the repository at this point in the history
for some reason loop with retry works slower on Windows than in Linux and the loop will exit because of a timeout
  • Loading branch information
Igor-Misic committed Sep 15, 2022
1 parent fe92dc5 commit 2579cb8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions socket_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ namespace socket {

namespace {

constexpr int kMaxNoDataRetry {150}; //!< Max number of retries with no data
constexpr int kMaxNoDataPeriod {1}; //!< Max time in [ms] while waiting
#ifdef Q_OS_WIN
constexpr int kMaxNoDataRetry {10}; //!< Max number of retries with no data
#else
constexpr int kMaxNoDataRetry {150}; //!< Max number of retries with no data
#endif
constexpr int kMaxNoDataPeriod {1}; //!< Max time in [ms] while waiting
constexpr qint64 kSocketTimeout {2000};

} // namespace
Expand Down

0 comments on commit 2579cb8

Please sign in to comment.