Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
ed98e371
Unverified
Commit
ed98e371
authored
Apr 24, 2017
by
Jakub Sztandera
Browse files
Extend time of observation by the factor of ActivationThresh
parent
955ebe34
Changes
1
Hide whitespace changes
Inline
Side-by-side
p2p/protocol/identify/obsaddr.go
View file @
ed98e371
...
...
@@ -26,7 +26,7 @@ func (oa *ObservedAddr) TryActivate(ttl time.Duration) bool {
// cleanup SeenBy set
now
:=
time
.
Now
()
for
k
,
t
:=
range
oa
.
SeenBy
{
if
now
.
Sub
(
t
)
>
ttl
{
if
now
.
Sub
(
t
)
>
ttl
*
ActivationThresh
{
delete
(
oa
.
SeenBy
,
k
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment