Skip to content

Commit

Permalink
connmgr: Fix the ConnReq print out causing panic
Browse files Browse the repository at this point in the history
  • Loading branch information
harzo authored and davecgh committed Jul 11, 2018
1 parent eec4f96 commit ddd66de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion connmgr/connmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit ddd66de

Please sign in to comment.