mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 18:55:32 +00:00
ws: swarm: remove peer ValidUntil update task, just create when needed
This commit is contained in:
parent
36954e5f48
commit
d4c95d89c0
2 changed files with 2 additions and 19 deletions
|
|
@ -62,7 +62,6 @@ impl TorrentMaps {
|
|||
rng: &mut SmallRng,
|
||||
out_messages: &mut Vec<(OutMessageMeta, OutMessage)>,
|
||||
server_start_instant: ServerStartInstant,
|
||||
valid_until: ValidUntil,
|
||||
request_sender_meta: InMessageMeta,
|
||||
request: AnnounceRequest,
|
||||
) {
|
||||
|
|
@ -72,6 +71,8 @@ impl TorrentMaps {
|
|||
self.ipv6.entry(request.info_hash).or_default()
|
||||
};
|
||||
|
||||
let valid_until = ValidUntil::new(server_start_instant, config.cleaning.max_peer_age);
|
||||
|
||||
// If there is already a peer with this peer_id, check that connection id
|
||||
// is same as that of request sender. Otherwise, ignore request. Since
|
||||
// peers have access to each others peer_id's, they could send requests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue