Fix calculateIdleTimeoutCompnents

This commit is contained in:
alexhultman-2fa
2021-04-13 14:19:05 +02:00
committed by GitHub
parent 75e2479a9c
commit b7c82d7910
+1 -1
View File
@@ -83,7 +83,7 @@ public:
unsigned short margin = 4;
/* 4, 8 or 16 seconds margin based on idleTimeout */
while ((int) idleTimeout - margin * 2 >= margin * 2 && margin < 16) {
margin = (unsigned short) (margin << 2);
margin = (unsigned short) (margin << 1);
}
/* We should have no margin if not using sendPingsAutomatically */
if (!sendPingsAutomatically) {