mirror of
https://github.com/rclone/rclone
synced 2024-12-29 22:26:24 +01:00
lib/http: fix race condition
This commit is contained in:
parent
a85c0b0cc2
commit
5db4493557
@ -19,12 +19,9 @@ const (
|
|||||||
func NewBaseContext(ctx context.Context, url string) func(l net.Listener) context.Context {
|
func NewBaseContext(ctx context.Context, url string) func(l net.Listener) context.Context {
|
||||||
return func(l net.Listener) context.Context {
|
return func(l net.Listener) context.Context {
|
||||||
if l.Addr().Network() == "unix" {
|
if l.Addr().Network() == "unix" {
|
||||||
ctx = context.WithValue(ctx, ctxKeyUnixSock, true)
|
return context.WithValue(ctx, ctxKeyUnixSock, true)
|
||||||
return ctx
|
|
||||||
}
|
}
|
||||||
|
return context.WithValue(ctx, ctxKeyPublicURL, url)
|
||||||
ctx = context.WithValue(ctx, ctxKeyPublicURL, url)
|
|
||||||
return ctx
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user