Commit 66b797a4 authored by Mikio Hara's avatar Mikio Hara

net: close TCPListener in example

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/8073044
parent 245dc62c
......@@ -16,6 +16,7 @@ func ExampleListener() {
if err != nil {
log.Fatal(err)
}
defer l.Close()
for {
// Wait for a connection.
conn, err := l.Accept()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment