From c480c00280f0c2c6ae69b2641899af0a4396efab Mon Sep 17 00:00:00 2001 From: Linus Peng Date: Mon, 13 Mar 2017 17:42:40 +0800 Subject: [PATCH 1/2] Qos 0 do not need to respond PUBACK ref: http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718041 --- .gitignore | 1 + mqtt.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 04e57c7..9a8a355 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ smqttsrv/smqttsrv mqttsrv/mqttsrv vbridge/vbridge ticktock/ticktock +.idea/* diff --git a/mqtt.go b/mqtt.go index 19bd498..1680af4 100644 --- a/mqtt.go +++ b/mqtt.go @@ -597,7 +597,7 @@ func (c *incomingConn) reader() { } else { c.svr.subs.submit(c, m) } - c.submit(&proto.PubAck{MessageId: m.MessageId}) + //c.submit(&proto.PubAck{MessageId: m.MessageId}) case *proto.PingReq: c.submit(&proto.PingResp{}) From cb8eacbb04862cc7e4c3dbbc19beb2b261040bce Mon Sep 17 00:00:00 2001 From: Linus Peng Date: Mon, 13 Mar 2017 17:50:06 +0800 Subject: [PATCH 2/2] ig --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9a8a355..04e57c7 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,3 @@ smqttsrv/smqttsrv mqttsrv/mqttsrv vbridge/vbridge ticktock/ticktock -.idea/*