diff --git a/database/cursor.go b/database/cursor.go index 91a4bd807..0727f47ca 100644 --- a/database/cursor.go +++ b/database/cursor.go @@ -16,8 +16,7 @@ type Cursor interface { Seek(key *Key) error // Key returns the key of the current key/value pair, or ErrNotFound if done. - // Note that the key is trimmed to not include the prefix the cursor was opened - // with. The caller should not modify the contents of the returned slice, and + // The caller should not modify the contents of the returned key, and // its contents may change on the next call to Next. Key() (*Key, error) diff --git a/server/p2p/p2p.go b/server/p2p/p2p.go index 8d85b34c5..05832eb64 100644 --- a/server/p2p/p2p.go +++ b/server/p2p/p2p.go @@ -1047,6 +1047,12 @@ func (s *Server) outboundPeerConnected(state *peerState, msg *outboundPeerConnec // outboundPeerConnected is invoked by the connection manager when a new // outbound connection failed to be established. func (s *Server) outboundPeerConnectionFailed(msg *outboundPeerConnectionFailedMsg) { + // If the connection request has no address + // associated to it, do nothing. + if msg.connReq.Addr == nil { + return + } + host, portStr, err := net.SplitHostPort(msg.connReq.Addr.String()) if err != nil { srvrLog.Debugf("Cannot extract address host and port %s: %s", msg.connReq.Addr, err)