async cant use req ctx
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
@@ -71,7 +72,7 @@ func (s *Server) Connect(w http.ResponseWriter, r *http.Request) {
|
|||||||
defer src.Close()
|
defer src.Close()
|
||||||
io.Copy(
|
io.Copy(
|
||||||
throttledWriter{
|
throttledWriter{
|
||||||
ctx: r.Context(),
|
ctx: context.Background(),
|
||||||
w: dst,
|
w: dst,
|
||||||
limiter: s.limiter,
|
limiter: s.limiter,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user