commit 37df65c28a10096bc5281584f859edacc27fd015
parent fb6882101d9a6e202aa6da50862040ad65e6698f
Author: Matsuda Kenji <info@mtkn.jp>
Date: Mon, 18 Dec 2023 11:46:10 +0900
close net.Conn after Serve() returns
Diffstat:
4 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/cmd/diskfs/main.go b/cmd/diskfs/main.go
@@ -70,6 +70,7 @@ func handle(ctx context.Context, wg *sync.WaitGroup, conn net.Conn, disk *diskfs
srv.Chatty()
}
srv.Serve(ctx)
+ conn.Close()
wg.Done()
}
diff --git a/cmd/iofs/main.go b/cmd/iofs/main.go
@@ -50,4 +50,5 @@ func handle(conn net.Conn, disk *iofs.FS) {
srv.Chatty()
}
srv.Serve(context.Background())
+ conn.Close()
}
diff --git a/cmd/numfs/main.go b/cmd/numfs/main.go
@@ -204,4 +204,5 @@ func handle(conn net.Conn, fs *numFS) {
srv.Chatty()
}
srv.Serve(context.Background())
+ conn.Close()
}
diff --git a/cmd/semfs/main.go b/cmd/semfs/main.go
@@ -40,4 +40,5 @@ func handle(conn net.Conn, fsys *semFS) {
srv.Chatty()
}
srv.Serve(context.Background())
+ conn.Close()
}