Handle serve exception

This commit is contained in:
Clara Riese 2024-12-06 12:29:25 +01:00
parent f727e7f971
commit d3e96691fb

View File

@ -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)
}
}
}