Fix memory leak

This commit is contained in:
wweir
2018-11-29 07:24:28 +08:00
parent 1222fdfe34
commit b772ed1c28
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -20,6 +20,7 @@ blocklist=[
"img1.blogblog.com",
"*.golang.org", # golang
"go.googlesource.com",
"gist.github.com",
"*.wikipedia.org", # wikipeida
"*.wikimedia.org",
"*.wikisource.org",
+3
View File
@@ -57,11 +57,14 @@ func openStream(conn net.Conn, sess quic.Session, reDialCh chan<- net.Conn) bool
select {
case okCh <- struct{}{}:
default:
close(okCh)
return
}
close(okCh)
conn.(*net.TCPConn).SetKeepAlive(true)
relay(&streamConn{stream, sess}, conn)
conn.Close()
}()
select {