mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-26 16:24:10 +08:00
Update comments, release notes, version.
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
|
* [Core] MQTT Packets being sent over web socket transport are now setting the web socket frame boundaries correctly (#1499).
|
||||||
* [Client] Keep alive mechanism now uses the configured timeout value from the options (thanks to @Stannieman, #1495).
|
* [Client] Keep alive mechanism now uses the configured timeout value from the options (thanks to @Stannieman, #1495).
|
||||||
* [Core] MQTT Packets being sent over web socket transport are now setting the web socket frame boundaries correctly (#1499).
|
* [Server] A DISCONNECT packet is no longer sent to MQTT clients < 5.0.0 (thanks to @logicaloud, #1506).
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name: CI
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
VERSION: "4.1.0.${{github.run_number}}"
|
VERSION: "4.1.1.${{github.run_number}}"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -147,15 +147,20 @@ namespace MQTTnet.Server
|
|||||||
{
|
{
|
||||||
IsRunning = false;
|
IsRunning = false;
|
||||||
|
|
||||||
// Potentially send disconnect reason to MQTT 5 clients
|
// Sending DISCONNECT packets from the server to the client is only supported when using MQTTv5+.
|
||||||
|
if (ChannelAdapter.PacketFormatterAdapter.ProtocolVersion == MqttProtocolVersion.V500)
|
||||||
if (ChannelAdapter.PacketFormatterAdapter.ProtocolVersion == MqttProtocolVersion.V500 && reason != MqttDisconnectReasonCode.NormalDisconnection)
|
|
||||||
{
|
{
|
||||||
// Is is very important to send the DISCONNECT packet here BEFORE cancelling the
|
// The Client or Server MAY send a DISCONNECT packet before closing the Network Connection.
|
||||||
// token because the entire connection is closed (disposed) as soon as the cancellation
|
// This library does not sent a DISCONNECT packet for a normal disconnection. Maybe adding
|
||||||
// token is cancelled. To there is no chance that the DISCONNECT packet will ever arrive
|
// a configuration option is requested in the future.
|
||||||
// at the client!
|
if (reason != MqttDisconnectReasonCode.NormalDisconnection)
|
||||||
await TrySendDisconnectPacket(reason).ConfigureAwait(false);
|
{
|
||||||
|
// Is is very important to send the DISCONNECT packet here BEFORE cancelling the
|
||||||
|
// token because the entire connection is closed (disposed) as soon as the cancellation
|
||||||
|
// token is cancelled. To there is no chance that the DISCONNECT packet will ever arrive
|
||||||
|
// at the client!
|
||||||
|
await TrySendDisconnectPacket(reason).ConfigureAwait(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StopInternal();
|
StopInternal();
|
||||||
|
|||||||
Reference in New Issue
Block a user