From 0574a0b6efb29e6eb169b4387a5adfd33adf9b89 Mon Sep 17 00:00:00 2001 From: YR Chen Date: Sat, 24 Aug 2024 21:32:49 +0800 Subject: [PATCH] replace hard-coded `log.Fatalf`s --- sshmux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sshmux.go b/sshmux.go index 3a94a38..3fdc770 100644 --- a/sshmux.go +++ b/sshmux.go @@ -92,11 +92,11 @@ func makeServer(config Config) (*Server, error) { if loggerURL.Scheme == "udp" { conn, err := net.Dial("udp", loggerURL.Host) if err != nil { - log.Fatalf("Logger Dial failed: %s\n", err) + return nil, fmt.Errorf("logger dial failed: %s", err) } logWriter = conn } else { - log.Fatalf("unsupported logger endpoint: %s\n", config.Logger.Endpoint) + return nil, fmt.Errorf("unsupported logger endpoint: %s", config.Logger.Endpoint) } } else { logWriter = io.Discard