mirror of
https://github.com/fhmq/hmq.git
synced 2026-06-15 17:51:33 +00:00
fix ipv6 addresses (#68)
This commit is contained in:
+2
-2
@@ -93,8 +93,8 @@ var (
|
|||||||
|
|
||||||
func (c *client) init() {
|
func (c *client) init() {
|
||||||
c.status = Connected
|
c.status = Connected
|
||||||
c.info.localIP = strings.Split(c.conn.LocalAddr().String(), ":")[0]
|
c.info.localIP, _, _ = net.SplitHostPort(c.conn.LocalAddr().String())
|
||||||
c.info.remoteIP = strings.Split(c.conn.RemoteAddr().String(), ":")[0]
|
c.info.remoteIP, _, _ = net.SplitHostPort(c.conn.RemoteAddr().String())
|
||||||
c.ctx, c.cancelFunc = context.WithCancel(context.Background())
|
c.ctx, c.cancelFunc = context.WithCancel(context.Background())
|
||||||
c.subMap = make(map[string]*subscription)
|
c.subMap = make(map[string]*subscription)
|
||||||
c.topicsMgr = c.broker.topicsMgr
|
c.topicsMgr = c.broker.topicsMgr
|
||||||
|
|||||||
Reference in New Issue
Block a user