Skip to content

Commit

Permalink
Apply minimum mqtt timeout constraint and inform client of updated ti…
Browse files Browse the repository at this point in the history
…meout if too low (#1180)
  • Loading branch information
jfallows authored Aug 5, 2024
1 parent c344036 commit 1dbc46b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2883,7 +2883,7 @@ private int onDecodeConnect(

this.keepAlive = (short) Math.min(Math.max(keepAlive, keepAliveMinimum), keepAliveMaximum);
serverDefinedKeepAlive = this.keepAlive != keepAlive;
keepAliveTimeout = Math.round(TimeUnit.SECONDS.toMillis(keepAlive) * 1.5);
keepAliveTimeout = Math.round(TimeUnit.SECONDS.toMillis(this.keepAlive) * 1.5);
connectFlags = flags;
version = protocolVersion;
doSignalKeepAliveTimeout(traceId);
Expand Down

0 comments on commit 1dbc46b

Please sign in to comment.