Merge pull request #1316 from halseth/connmgr-nil-addr
connmanager: check Addr for nil
This commit is contained in:
commit
5f1bfdec9a
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ func (c *ConnReq) State() ConnState {
|
||||||
|
|
||||||
// String returns a human-readable string for the connection request.
|
// String returns a human-readable string for the connection request.
|
||||||
func (c *ConnReq) String() string {
|
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("reqid %d", atomic.LoadUint64(&c.id))
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("%s (reqid %d)", c.Addr, atomic.LoadUint64(&c.id))
|
return fmt.Sprintf("%s (reqid %d)", c.Addr, atomic.LoadUint64(&c.id))
|
||||||
|
|
Loading…
Reference in a new issue