mirror of
https://github.com/wweir/sower.git
synced 2024-04-21 12:42:15 +00:00
Fix memory leak
This commit is contained in:
@@ -20,6 +20,7 @@ blocklist=[
|
||||
"img1.blogblog.com",
|
||||
"*.golang.org", # golang
|
||||
"go.googlesource.com",
|
||||
"gist.github.com",
|
||||
"*.wikipedia.org", # wikipeida
|
||||
"*.wikimedia.org",
|
||||
"*.wikisource.org",
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user