修改:主题取消订阅无效 bug

git-svn-id: svn://47.119.165.148/zhub@98 e63fbceb-bcc3-4977-ac22-735b83d8d0f4
This commit is contained in:
lxy
2021-02-03 08:01:57 +00:00
parent e532252ab5
commit ad3f7686ae
5 changed files with 32 additions and 13 deletions

View File

@@ -119,6 +119,11 @@ func (c *Client) Subscribe(topic string, fun func(v string)) {
}
}
func (c *Client) Unsubscribe(topic string) {
c.send("unsubscribe " + topic)
delete(c.subFun, topic)
}
/*
---
ping