forked from I2P_Developers/i2p.i2p
SSU2: Update activity on path challenge/response
This commit is contained in:
@@ -493,6 +493,7 @@ public class PeerState2 extends PeerState implements SSU2Payload.PayloadCallback
|
|||||||
_pathChallengeSendCount = 1;
|
_pathChallengeSendCount = 1;
|
||||||
_pendingRemoteHostId = from;
|
_pendingRemoteHostId = from;
|
||||||
sendPathChallenge(dpacket.getAddress(), from.getPort());
|
sendPathChallenge(dpacket.getAddress(), from.getPort());
|
||||||
|
setLastSendTime(_migrationStarted);
|
||||||
} else {
|
} else {
|
||||||
// don't attempt to switch
|
// don't attempt to switch
|
||||||
if (_log.shouldWarn())
|
if (_log.shouldWarn())
|
||||||
@@ -525,6 +526,7 @@ public class PeerState2 extends PeerState implements SSU2Payload.PayloadCallback
|
|||||||
_migrationNextSendTime = now + (PATH_CHALLENGE_DELAY << _pathChallengeSendCount);
|
_migrationNextSendTime = now + (PATH_CHALLENGE_DELAY << _pathChallengeSendCount);
|
||||||
_pathChallengeSendCount++;
|
_pathChallengeSendCount++;
|
||||||
sendPathChallenge(dpacket.getAddress(), from.getPort());
|
sendPathChallenge(dpacket.getAddress(), from.getPort());
|
||||||
|
setLastSendTime(now);
|
||||||
}
|
}
|
||||||
limitSending = true;
|
limitSending = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -835,6 +837,9 @@ public class PeerState2 extends PeerState implements SSU2Payload.PayloadCallback
|
|||||||
this);
|
this);
|
||||||
// TODO send to from address?
|
// TODO send to from address?
|
||||||
_transport.send(pkt);
|
_transport.send(pkt);
|
||||||
|
long now = _context.clock().now();
|
||||||
|
setLastSendTime(now);
|
||||||
|
setLastReceiveTime(now);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void gotPathResponse(RemoteHostId from, byte[] data) {
|
public void gotPathResponse(RemoteHostId from, byte[] data) {
|
||||||
@@ -858,6 +863,9 @@ public class PeerState2 extends PeerState implements SSU2Payload.PayloadCallback
|
|||||||
Collections.singletonList(block),
|
Collections.singletonList(block),
|
||||||
this);
|
this);
|
||||||
_transport.send(pkt);
|
_transport.send(pkt);
|
||||||
|
long now = _context.clock().now();
|
||||||
|
setLastSendTime(now);
|
||||||
|
setLastReceiveTime(now);
|
||||||
} else {
|
} else {
|
||||||
messagePartiallyReceived();
|
messagePartiallyReceived();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user