Skip to content

Commit ebad1ba

Browse files
fix: 0x09 byte (correlation data) incompatibiity with the specification (#20)
1 parent 120c454 commit ebad1ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/zmqtt/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,10 @@ async def request(
561561
else:
562562
reply_topic = f"_zmqtt/reply/{os.urandom(16).hex()}"
563563

564-
corr = (properties.correlation_data if properties is not None else None) or os.urandom(16)
564+
if properties is not None and properties.correlation_data is not None:
565+
corr = properties.correlation_data
566+
else:
567+
corr = os.urandom(16)
565568

566569
if properties is not None:
567570
req_props = dataclasses.replace(

0 commit comments

Comments
 (0)