SSU2: Destroy PS2 cipher states when done

This commit is contained in:
zzz
2022-12-11 15:12:15 -05:00
parent 4a4ca0cdf0
commit 803265660e

View File

@@ -94,11 +94,13 @@ class PeerStateDestroyed implements SSU2Payload.PayloadCallback, SSU2Sender {
}
/**
* Call at transport shutdown
* Call at transport shutdown or cache eviction
*/
public void kill() {
_ackTimer.cancel();
_killTimer.cancel();
_sendCha.destroy();
_rcvCha.destroy();
}
/// begin SSU2Sender interface ///
@@ -358,6 +360,8 @@ class PeerStateDestroyed implements SSU2Payload.PayloadCallback, SSU2Sender {
_log.debug("Done listening for " + PeerStateDestroyed.this);
_ackTimer.cancel();
_transport.removeRecentlyClosed(PeerStateDestroyed.this);
_sendCha.destroy();
_rcvCha.destroy();
}
}