-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1883 in a weak network environment the mqtt broker is unable to detec…
…t disconnections (#1891) * Add new setting * Align keep alive handling with RFC Only completely sent packets are treated as keep alive * Update ReleaseNotes.md
- Loading branch information
Showing
7 changed files
with
60 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
* [Server] Added new events for delivered and dropped messages (#1866, thanks to @kallayj). | ||
* [Server] The server will no longer treat a client which is receiving a large payload as alive. The packet must be received completely within the keep alive boundaries (BREAKING CHANGE!, #1883). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
Source/MQTTnet/Server/Options/MqttServerKeepAliveOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
|
||
namespace MQTTnet.Server | ||
{ | ||
public sealed class MqttServerKeepAliveOptions | ||
{ | ||
/// <summary> | ||
/// When this mode is enabled the MQTT server will not close a connection when the | ||
/// client is currently sending a (large) payload. This may lead to "dead" connections | ||
/// When this mode is disabled the MQTT server will disconnect a client when the keep | ||
/// alive timeout is reached even if the client is currently sending a (large) payload. | ||
/// </summary> | ||
public bool DisconnectClientWhenReadingPayload { get; set; } | ||
|
||
public TimeSpan MonitorInterval { get; set; } = TimeSpan.FromMilliseconds(500); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters