From 0cef5854b25d6300da9ac6b26b1ebefe7e235132 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 8 Dec 2024 09:18:56 +0800 Subject: Remove unnecessary anonymous function --- main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 15a885c..42543f6 100644 --- a/main.go +++ b/main.go @@ -37,9 +37,7 @@ func main() { slog.Error("connection routine panicked", "raised", raised) } }() - defer func() { - conn.Close() - }() + defer conn.Close() client, err := NewLocalClient(&conn) if err != nil { slog.Error("cannot make new local client", "error", err) -- cgit v1.2.3