mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-23 13:23:05 +08:00
renaming and added cast
This commit is contained in:
@@ -14,8 +14,10 @@
|
|||||||
<releaseNotes>
|
<releaseNotes>
|
||||||
* [Client] Fixed wrong value for "ClientWasConnected" in "MqttClientDisconnectedEventArgs" #976 (thanks to @dbeinder).
|
* [Client] Fixed wrong value for "ClientWasConnected" in "MqttClientDisconnectedEventArgs" #976 (thanks to @dbeinder).
|
||||||
* [Client] Added direct support for Amazon AWS connections (requires .NET Core 3.1) (thanks to @henning-krause).
|
* [Client] Added direct support for Amazon AWS connections (requires .NET Core 3.1) (thanks to @henning-krause).
|
||||||
|
* [Client] handle disconnect package and propagate disconnect reason code (thanks to @JanEggers)
|
||||||
* [ManagedClient] Exposed the internal MQTT client.
|
* [ManagedClient] Exposed the internal MQTT client.
|
||||||
* [Server] Added client message queue interceptor for QoS level (tahnks to @msallin).
|
* [Server] Added client message queue interceptor for QoS level (thanks to @msallin).
|
||||||
|
* [Server] improved behavior when multiple connections fight over a session (thanks to @JanEggers)
|
||||||
</releaseNotes>
|
</releaseNotes>
|
||||||
<copyright>Copyright Christian Kratky 2016-2020</copyright>
|
<copyright>Copyright Christian Kratky 2016-2020</copyright>
|
||||||
<tags>MQTT Message Queue Telemetry Transport MQTTClient MQTTServer Server MQTTBroker Broker NETStandard IoT InternetOfThings Messaging Hardware Arduino Sensor Actuator M2M ESP Smart Home Cities Automation Xamarin Blazor</tags>
|
<tags>MQTT Message Queue Telemetry Transport MQTTClient MQTTServer Server MQTTBroker Broker NETStandard IoT InternetOfThings Messaging Hardware Arduino Sensor Actuator M2M ESP Smart Home Cities Automation Xamarin Blazor</tags>
|
||||||
|
|||||||
@@ -561,7 +561,7 @@ namespace MQTTnet.Client
|
|||||||
{
|
{
|
||||||
await SendAsync(new MqttPingRespPacket(), cancellationToken).ConfigureAwait(false);
|
await SendAsync(new MqttPingRespPacket(), cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
else if (packet is MqttDisconnectPacket disc)
|
else if (packet is MqttDisconnectPacket disconnectPacket)
|
||||||
{
|
{
|
||||||
// Also dispatch disconnect to waiting threads to generate a proper exception.
|
// Also dispatch disconnect to waiting threads to generate a proper exception.
|
||||||
_packetDispatcher.Dispatch(packet);
|
_packetDispatcher.Dispatch(packet);
|
||||||
@@ -569,7 +569,7 @@ namespace MQTTnet.Client
|
|||||||
await DisconnectAsync(new MqttClientDisconnectOptions()
|
await DisconnectAsync(new MqttClientDisconnectOptions()
|
||||||
{
|
{
|
||||||
// todo conversion
|
// todo conversion
|
||||||
ReasonCode = disc.ReasonCode
|
ReasonCode = (MqttClientDisconnectReason)(disconnectPacket.ReasonCode ?? MqttDisconnectReasonCode.UnspecifiedError)
|
||||||
}, cancellationToken).ConfigureAwait(false);
|
}, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
else if (packet is MqttAuthPacket authPacket)
|
else if (packet is MqttAuthPacket authPacket)
|
||||||
|
|||||||
@@ -391,9 +391,9 @@ namespace MQTTnet.Server
|
|||||||
_connections.AddOrUpdate(connectPacket.ClientId, key =>
|
_connections.AddOrUpdate(connectPacket.ClientId, key =>
|
||||||
{
|
{
|
||||||
return connection;
|
return connection;
|
||||||
}, (key, tempexistingConnection) =>
|
}, (key, tempExistingConnection) =>
|
||||||
{
|
{
|
||||||
existingConnection = tempexistingConnection;
|
existingConnection = tempExistingConnection;
|
||||||
return connection;
|
return connection;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user