SSU: PeerState _remotePeer cannot be null

This commit is contained in:
zzz
2022-06-19 12:05:39 -04:00
parent 3c4956f0c3
commit b3072d9ef3

View File

@@ -443,10 +443,7 @@ public class PeerState {
}
/**
* The peer are we talking to. This should be set as soon as this
* state is created if we are initiating a connection, but if we are
* receiving the connection this will be set only after the connection
* is established.
* The peer are we talking to. Non-null.
*/
public Hash getRemotePeer() { return _remotePeer; }
/**
@@ -2372,8 +2369,7 @@ public class PeerState {
public String toString() {
StringBuilder buf = new StringBuilder(256);
buf.append(_remoteHostId.toString());
if (_remotePeer != null)
buf.append(" ").append(_remotePeer.toBase64().substring(0,6));
buf.append(' ').append(_remotePeer.toBase64().substring(0,6));
if (getVersion() == 2)
buf.append(_isInbound? " IB2 " : " OB2 ");