mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-15 00:15:15 +08:00
Fix wrong data validation (#342).
This commit is contained in:
@@ -244,11 +244,6 @@ namespace MQTTnet.Formatter.V3
|
||||
|
||||
public MqttDisconnectPacket CreateDisconnectPacket(MqttClientDisconnectOptions options)
|
||||
{
|
||||
if (options.ReasonCode != MqttClientDisconnectReason.NormalDisconnection || options.ReasonString != null)
|
||||
{
|
||||
throw new MqttProtocolViolationException("Reason codes and reason string for disconnect are only supported for MQTTv5.");
|
||||
}
|
||||
|
||||
return new MqttDisconnectPacket();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user