mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-12 09:33:23 +00:00
node: register decrypt worker on cross-connection-won promotion
The cross-connection-won branch of `promote_connection` builds a fresh ActivePeer with a new Noise session and our_index, inserts it into peers, and registers identity, but did not hand the new session to the decrypt shard worker pool. The normal-promotion tail in the same function does make that call. A session established via the cross-connection race path therefore missed the worker fast-path for its lifetime, falling back to inline decryption on the rx loop. Correctness was unaffected, but the throughput/latency benefit of the worker pool was lost for peerspromoted through that path. Mirror the normal-promotion tail and call `register_decrypt_worker_session` after the fresh ActivePeer is inserted into `self.peers` in the `this_wins` arm.
This commit is contained in:
@@ -1045,6 +1045,12 @@ impl Node {
|
||||
"Cross-connection resolved: this connection won"
|
||||
);
|
||||
|
||||
// Hand the FMP recv cipher + replay window to the
|
||||
// decrypt shard worker. (Same as normal-promotion tail
|
||||
// below.)
|
||||
#[cfg(unix)]
|
||||
self.register_decrypt_worker_session(&peer_node_addr);
|
||||
|
||||
Ok(PromotionResult::CrossConnectionWon {
|
||||
loser_link_id,
|
||||
node_addr: peer_node_addr,
|
||||
|
||||
Reference in New Issue
Block a user