mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-19 19:13:11 +08:00
Address issue #1818 where MqttConnectionContext throws an error when passed a TcpConnection. (#1819)
* Address issue #1818 where MqttConnectionContext throws and error when passed a TcpConnection. * Update ReleaseNotes.md --------- Co-authored-by: Christian <6939810+chkr1011@users.noreply.github.com>
This commit is contained in:
co-authored by
Christian
parent
b1dc8607af
commit
2180f59725
@@ -3,3 +3,4 @@
|
|||||||
* [Server] Fixed _NullReferenceException_ in retained messages management (#1762, thanks to @logicaloud).
|
* [Server] Fixed _NullReferenceException_ in retained messages management (#1762, thanks to @logicaloud).
|
||||||
* [Server] Exposed new option which allows disabling packet fragmentation (#1753).
|
* [Server] Exposed new option which allows disabling packet fragmentation (#1753).
|
||||||
* [Server] Expired sessions will no longer be used when a client connects (#1756).
|
* [Server] Expired sessions will no longer be used when a client connects (#1756).
|
||||||
|
* [Server] Fixed an issue in connection handling for ASP.NET connections (#1819, thanks to @CZEMacLeod).
|
||||||
|
|||||||
@@ -33,8 +33,11 @@ namespace MQTTnet.AspNetCore
|
|||||||
PacketFormatterAdapter = packetFormatterAdapter ?? throw new ArgumentNullException(nameof(packetFormatterAdapter));
|
PacketFormatterAdapter = packetFormatterAdapter ?? throw new ArgumentNullException(nameof(packetFormatterAdapter));
|
||||||
_connection = connection ?? throw new ArgumentNullException(nameof(connection));
|
_connection = connection ?? throw new ArgumentNullException(nameof(connection));
|
||||||
|
|
||||||
_input = connection.Transport.Input;
|
if (!(_connection is TcpConnection tcp) || tcp.IsConnected)
|
||||||
_output = connection.Transport.Output;
|
{
|
||||||
|
_input = connection.Transport.Input;
|
||||||
|
_output = connection.Transport.Output;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public long BytesReceived { get; private set; }
|
public long BytesReceived { get; private set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user