async cant use req ctx

master
bel 2022-08-12 23:46:00 -06:00
parent 80edc3876a
commit 0918fe57dc
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package main
import (
"context"
"crypto/tls"
"errors"
"io"
@ -71,7 +72,7 @@ func (s *Server) Connect(w http.ResponseWriter, r *http.Request) {
defer src.Close()
io.Copy(
throttledWriter{
ctx: r.Context(),
ctx: context.Background(),
w: dst,
limiter: s.limiter,
},