mirror of
https://github.com/FlipsideCrypto/dcrd.git
synced 2026-02-06 10:56:47 +00:00
connmgr: Fix the ConnReq print out causing panic
This commit is contained in:
parent
eec4f96b0d
commit
ddd66de604
@ -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))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user