From d76ccda3439b9efaaf877eeca4e2d31899eae12d 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 175f5e2..981847e 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