diff --git a/src/Property/PackProperty.php b/src/Property/PackProperty.php index 0092677..4a4b221 100644 --- a/src/Property/PackProperty.php +++ b/src/Property/PackProperty.php @@ -27,6 +27,7 @@ public static function connect(array $data): string $tmpBody .= chr($property); switch ($property) { case Property::SESSION_EXPIRY_INTERVAL: + case Property::MAXIMUM_PACKET_SIZE: $tmpBody .= PackTool::longInt($item); break; case Property::AUTHENTICATION_METHOD: @@ -39,7 +40,6 @@ public static function connect(array $data): string break; case Property::RECEIVE_MAXIMUM: case Property::TOPIC_ALIAS_MAXIMUM: - case Property::MAXIMUM_PACKET_SIZE: $tmpBody .= PackTool::shortInt($item); break; } diff --git a/src/Property/UnPackProperty.php b/src/Property/UnPackProperty.php index 1c00f4d..ffec78b 100644 --- a/src/Property/UnPackProperty.php +++ b/src/Property/UnPackProperty.php @@ -28,6 +28,7 @@ public static function connect(int $length, string &$remaining): array $remaining = substr($remaining, 1); switch ($property) { case Property::SESSION_EXPIRY_INTERVAL: + case Property::MAXIMUM_PACKET_SIZE: $properties[$key] = UnPackTool::longInt($remaining); $length -= 5; break; @@ -44,7 +45,6 @@ public static function connect(int $length, string &$remaining): array break; case Property::RECEIVE_MAXIMUM: case Property::TOPIC_ALIAS_MAXIMUM: - case Property::MAXIMUM_PACKET_SIZE: $properties[$key] = UnPackTool::shortInt($remaining); $length -= 3; break;