Close ServerTransport instead of the raw connection
diff --git a/server.go b/server.go
index 1c42b6e..d71c094 100644
--- a/server.go
+++ b/server.go
@@ -279,7 +279,7 @@
return
}
if !s.addConn(st) {
- c.Close()
+ st.Close()
return
}
s.serveStreams(st)
diff --git a/test/end2end_test.go b/test/end2end_test.go
index f1c7b42..9461cd6 100644
--- a/test/end2end_test.go
+++ b/test/end2end_test.go
@@ -1354,7 +1354,7 @@
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