From 829ee6c989d3b9e14d468f197be6649883d492b9 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sat, 27 Mar 2021 17:37:08 -0700 Subject: [PATCH] Save web port number for future launches when specifying it on the command line. Closes #860 --- main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index b0d9f9a40..aea4390b7 100644 --- a/main.go +++ b/main.go @@ -112,11 +112,12 @@ func main() { return } - config.WebServerPort = portNumber - } else { - config.WebServerPort = data.GetHTTPPortNumber() + log.Println("Saving new web server port number to", portNumber) + data.SetHTTPPortNumber(float64(portNumber)) } + config.WebServerPort = data.GetHTTPPortNumber() + // starts the core if err := core.Start(); err != nil { log.Fatalln("failed to start the core package", err)