Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lbry
ytsync
Commits
1331e576
Commit
1331e576
authored
Jul 13, 2019
by
ci
Browse files
actually use the functions I create...
parent
43f745ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
ipManager/throttle.go
View file @
1331e576
...
...
@@ -66,12 +66,13 @@ func GetNextIP(ipv6 bool) (string, error) {
return
nextIP
,
nil
}
func
r
eleaseIP
(
ip
string
)
{
func
R
eleaseIP
(
ip
string
)
{
ipMutex
.
Lock
()
defer
ipMutex
.
Unlock
()
ipLastUsed
[
ip
]
=
time
.
Now
()
ipInUse
[
ip
]
=
false
}
func
getLeastUsedIP
(
ipPool
[]
string
)
string
{
nextIP
:=
""
veryLastUse
:=
time
.
Now
()
...
...
sources/youtubeVideo.go
View file @
1331e576
...
...
@@ -221,6 +221,7 @@ func (v *YoutubeVideo) download(useIPv6 bool) error {
return
errors
.
Err
(
err
)
}
}
defer
ipManager
.
ReleaseIP
(
sourceAddress
)
if
useIPv6
{
log
.
Infof
(
"using IPv6: %s"
,
sourceAddress
)
ytdlArgs
=
append
(
ytdlArgs
,
...
...
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