Skip to content

疑似发现 OneNET Server 的 bug #2

@chunhuajiang

Description

@chunhuajiang

Hi,

发现一个 bug,不过不是本仓库的 bug,而是你们 OneNET 服务端的 bug,不知道在哪里报 bug,就直接写在这里了。

下面是 MQTT v3.1.1 协议的原话 【链接

3.2.2.2 Session Present 

Position: bit 0 of the Connect Acknowledge Flags. 

If the Server accepts a connection with CleanSession set to 1, the Server MUST set Session Present to 0 in the CONNACK packet in addition to setting a zero return code in the CONNACK packet [MQTT-3.2.2-1].

但是事实上,当我发送了一个 CleanSession 为 1 的 CONNECT 消息时,接收到的 CONNACK 消息的 Session Present 字段却为 1。

我的 CONNECT消息的内容是:

0x10 0x25 0x0 0x4 0x4d 0x51 0x54 0x54 0x4 0xc2 0x0 0x0 0x0 0x7 0x35 0x36 0x31 0x39 0x31 0x30 0x39 0x0 0x5 0x38 0x35 0x35 0x37 0x34 0x0 0x9 0x68 0x65 0x6c 0x6c 0x6f ......

我接收到的 CONNACK 消息却是:

0x20 0x02 0x01 0x00

正确的 CONNACK 消息应该是:

0x20 0x02 0x00 0x00

希望你们验证一下,然后给我一个回复

PS: 应该是我之前某个时候,发送过 CleanSession=0 的连接,从而导致你们记住了 Session。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions