From ddd66de60466b544ef7b41abe00ecd3f248b00d9 Mon Sep 17 00:00:00 2001 From: harzo Date: Wed, 11 Jul 2018 13:26:24 +0200 Subject: [PATCH] connmgr: Fix the ConnReq print out causing panic --- connmgr/connmanager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connmgr/connmanager.go b/connmgr/connmanager.go index c3369a22d1..7a53ed9f1d 100644 --- a/connmgr/connmanager.go +++ b/connmgr/connmanager.go @@ -82,7 +82,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))