From 4b5ff8c68737bbcabe9c4841019f7447d024d2f0 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Mon, 1 Oct 2018 13:55:43 +0200 Subject: [PATCH] connmanager: check Addr for nil --- connmgr/connmanager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connmgr/connmanager.go b/connmgr/connmanager.go index 4acc0b2d..2116934a 100644 --- a/connmgr/connmanager.go +++ b/connmgr/connmanager.go @@ -89,7 +89,7 @@ func (c *ConnReq) State() ConnState { // String returns a human-readable string for the connection request. func (c *ConnReq) String() string { - if c.Addr.String() == "" { + if c.Addr == nil || c.Addr.String() == "" { return fmt.Sprintf("reqid %d", atomic.LoadUint64(&c.id)) } return fmt.Sprintf("%s (reqid %d)", c.Addr, atomic.LoadUint64(&c.id))