From d3e96691fb9eb753d6afb955d4b40e5d32304637 Mon Sep 17 00:00:00 2001 From: Clara Riese Date: Fri, 6 Dec 2024 12:29:25 +0100 Subject: [PATCH] Handle serve exception --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index e2191d5..ccdb998 100644 --- a/main.go +++ b/main.go @@ -219,9 +219,10 @@ func main() { log.Printf("Starting ftp server on %v:%v", opts.Hostname, opts.Port) log.Printf("Username %v, Password %v", *user, *pass) server := server.NewServer(opts) - server.ListenAndServe() + + err = server.ListenAndServe() if err != nil { log.Fatal("Error starting server:", err) - } + } }