Skip to content

Commit

Permalink
Fix calculateIdleTimeoutCompnents
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhultman-2fa committed Apr 13, 2021
1 parent 75e2479 commit b7c82d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WebSocketContextData.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ struct WebSocketContextData {
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) {
Expand Down

0 comments on commit b7c82d7

Please sign in to comment.