Fixed error msg about 64-bit port integer (did not actually cause fatal errors), tested with updated go bin

This commit is contained in:
2018-12-27 15:24:07 -05:00
parent 01a976ab2f
commit 0560c2f3fe
3 changed files with 7 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
[serverConfig]
ServerPort = ":8000" #leave format as is it expects a string with colon
ServerPort = "8000" #leave format as is it expects a string with colon
ServerAddr = "192.168.1.8" #Put in the IP address you want to bind to
LogLevel = "Debug" # Options = Debug, Info, Warn, Error, Fatal, Panic
LogOutput = "file" #Options = file, stdout #file will print it to logs/server.log

View File

@@ -214,7 +214,7 @@ func main() {
}
Engine.CheckTorrentWatchFolder(cronEngine, db, tclient, torrentLocalStorage, Config, torrentQueues) //Every 5 minutes the engine will check the specified folder for new .torrent files
Engine.RefreshRSSCron(cronEngine, db, tclient, torrentLocalStorage, Config, torrentQueues) // Refresing the RSS feeds on an hourly basis to add torrents that show up in the RSS feed
Engine.CheckTorrentsCron(cronEngine, db, tclient, Config)
Engine.CheckTorrentsCron(cronEngine, db, tclient, Config) //Every 30 seconds all torrents are checked to see if queue changes need to be made or they need to be stopped due to ratio
router := mux.NewRouter() //setting up the handler for the web backend
router.HandleFunc("/", serveHome) //Serving the main page for our SPA

View File

@@ -18,6 +18,7 @@ import (
//Logger is the injected variable for global logger
var Logger *logrus.Logger
//ClientConnectSettings contains all the settings for connecting and authenticating to the server
type ClientConnectSettings struct {
HTTPAddr string
HTTPAddrIP string
@@ -146,7 +147,8 @@ func FullClientSettingsNew() FullClientSettings {
}
//HTTP, proxy
httpAddrIP := viper.GetString("serverConfig.ServerAddr")
httpAddrPort := viper.GetString("serverConfig.ServerPort")
httpAddrPortRaw := viper.GetString("serverConfig.ServerPort")
httpAddrPort := ":" + httpAddrPortRaw //adding the separator required for running the webui
httpAddr = httpAddrIP + httpAddrPort
proxySet := viper.GetBool("reverseProxy.ProxyEnabled")
websocketClientPort = strings.TrimLeft(viper.GetString("serverConfig.ServerPort"), ":") //Trimming off the colon in front of the port
@@ -215,7 +217,8 @@ func FullClientSettingsNew() FullClientSettings {
// fmt.Println("Reading in custom DHT config")
// dhtServerConfig = dhtServerSettings(dhtServerConfig)
//}
httpAddrPortInt64, err := strconv.ParseInt(httpAddrPort, 10, 0)
strippedHTTPPort := strings.TrimPrefix(httpAddrPort, ":")
httpAddrPortInt64, err := strconv.ParseInt(strippedHTTPPort, 10, 0)
if err != nil {
fmt.Println("Failed creating 64-bit integer for goTorrent Port!", err)
}