forked from I2P_Developers/i2p.i2p
SSU2: Send termination in response to termination
This commit is contained in:
@ -630,6 +630,10 @@ public class PeerState2 extends PeerState implements SSU2Payload.PayloadCallback
|
|||||||
public void gotTermination(int reason, long count) {
|
public void gotTermination(int reason, long count) {
|
||||||
if (_log.shouldInfo())
|
if (_log.shouldInfo())
|
||||||
_log.info("Got TERMINATION block, reason: " + reason + " count: " + count + " on " + this);
|
_log.info("Got TERMINATION block, reason: " + reason + " count: " + count + " on " + this);
|
||||||
|
if (reason != SSU2Util.REASON_TERMINATION) {
|
||||||
|
UDPPacket pkt = _transport.getBuilder2().buildSessionDestroyPacket(SSU2Util.REASON_TERMINATION, this);
|
||||||
|
_transport.send(pkt);
|
||||||
|
}
|
||||||
_transport.getEstablisher().receiveSessionDestroy(_remoteHostId, this);
|
_transport.getEstablisher().receiveSessionDestroy(_remoteHostId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user