Close ServerTransport instead of the raw connection

This commit is contained in:
iamqizhao 2016-02-08 14:27:06 -08:00
parent 16885aa34b
commit 77ccaa8fb2
2 changed files with 2 additions and 2 deletions

View File

@ -279,7 +279,7 @@ func (s *Server) serveNewHTTP2Transport(c net.Conn, authInfo credentials.AuthInf
return
}
if !s.addConn(st) {
c.Close()
st.Close()
return
}
s.serveStreams(st)

View File

@ -1354,7 +1354,7 @@ func interestingGoroutines() (gs []string) {
return
}
var failOnLeaks = flag.Bool("fail_on_leaks", false, "Fail tests if goroutines leak.")
var failOnLeaks = flag.Bool("fail_on_leaks", true, "Fail tests if goroutines leak.")
// leakCheck snapshots the currently-running goroutines and returns a
// function to be run at the end of tests to see whether any