Refactoring

This commit is contained in:
Christian Kratky
2017-10-19 18:50:22 +02:00
parent 9915cc4492
commit 40b1be075c
31 changed files with 166 additions and 137 deletions
+1 -2
View File
@@ -12,8 +12,7 @@ namespace MQTTnet.Core.Packets
if (responsePacket is IMqttPacketWithIdentifier responsePacketWithIdentifier)
{
var requestPacketWithIdentifier = packet as IMqttPacketWithIdentifier;
if (requestPacketWithIdentifier == null)
if (!(packet is IMqttPacketWithIdentifier requestPacketWithIdentifier))
{
throw new InvalidOperationException("Response packet has PacketIdentifier but request packet does not.");
}