Skip to content

Commit 2579cb8

Browse files
committed
socket_client: reduce kMaxNoDataRetry for Windows OS
for some reason loop with retry works slower on Windows than in Linux and the loop will exit because of a timeout
1 parent fe92dc5 commit 2579cb8

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

socket_client.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ namespace socket {
4545

4646
namespace {
4747

48-
constexpr int kMaxNoDataRetry {150}; //!< Max number of retries with no data
49-
constexpr int kMaxNoDataPeriod {1}; //!< Max time in [ms] while waiting
48+
#ifdef Q_OS_WIN
49+
constexpr int kMaxNoDataRetry {10}; //!< Max number of retries with no data
50+
#else
51+
constexpr int kMaxNoDataRetry {150}; //!< Max number of retries with no data
52+
#endif
53+
constexpr int kMaxNoDataPeriod {1}; //!< Max time in [ms] while waiting
5054
constexpr qint64 kSocketTimeout {2000};
5155

5256
} // namespace

0 commit comments

Comments
 (0)