Skip to content

Commit

Permalink
Merge pull request decred#1316 from halseth/connmgr-nil-addr
Browse files Browse the repository at this point in the history
 connmanager: check Addr for nil
  • Loading branch information
Roasbeef authored Oct 13, 2018
2 parents d2b1a06 + 4b5ff8c commit 5f1bfde
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 @@ -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))
Expand Down

0 comments on commit 5f1bfde

Please sign in to comment.