Fixed error msg about 64-bit port integer (did not actually cause fatal errors), tested with updated go bin
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
[serverConfig]
|
[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
|
ServerAddr = "192.168.1.8" #Put in the IP address you want to bind to
|
||||||
LogLevel = "Debug" # Options = Debug, Info, Warn, Error, Fatal, Panic
|
LogLevel = "Debug" # Options = Debug, Info, Warn, Error, Fatal, Panic
|
||||||
LogOutput = "file" #Options = file, stdout #file will print it to logs/server.log
|
LogOutput = "file" #Options = file, stdout #file will print it to logs/server.log
|
||||||
|
2
main.go
2
main.go
@@ -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.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.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 := mux.NewRouter() //setting up the handler for the web backend
|
||||||
router.HandleFunc("/", serveHome) //Serving the main page for our SPA
|
router.HandleFunc("/", serveHome) //Serving the main page for our SPA
|
||||||
|
@@ -18,6 +18,7 @@ import (
|
|||||||
//Logger is the injected variable for global logger
|
//Logger is the injected variable for global logger
|
||||||
var Logger *logrus.Logger
|
var Logger *logrus.Logger
|
||||||
|
|
||||||
|
//ClientConnectSettings contains all the settings for connecting and authenticating to the server
|
||||||
type ClientConnectSettings struct {
|
type ClientConnectSettings struct {
|
||||||
HTTPAddr string
|
HTTPAddr string
|
||||||
HTTPAddrIP string
|
HTTPAddrIP string
|
||||||
@@ -146,7 +147,8 @@ func FullClientSettingsNew() FullClientSettings {
|
|||||||
}
|
}
|
||||||
//HTTP, proxy
|
//HTTP, proxy
|
||||||
httpAddrIP := viper.GetString("serverConfig.ServerAddr")
|
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
|
httpAddr = httpAddrIP + httpAddrPort
|
||||||
proxySet := viper.GetBool("reverseProxy.ProxyEnabled")
|
proxySet := viper.GetBool("reverseProxy.ProxyEnabled")
|
||||||
websocketClientPort = strings.TrimLeft(viper.GetString("serverConfig.ServerPort"), ":") //Trimming off the colon in front of the port
|
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")
|
// fmt.Println("Reading in custom DHT config")
|
||||||
// dhtServerConfig = dhtServerSettings(dhtServerConfig)
|
// dhtServerConfig = dhtServerSettings(dhtServerConfig)
|
||||||
//}
|
//}
|
||||||
httpAddrPortInt64, err := strconv.ParseInt(httpAddrPort, 10, 0)
|
strippedHTTPPort := strings.TrimPrefix(httpAddrPort, ":")
|
||||||
|
httpAddrPortInt64, err := strconv.ParseInt(strippedHTTPPort, 10, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Failed creating 64-bit integer for goTorrent Port!", err)
|
fmt.Println("Failed creating 64-bit integer for goTorrent Port!", err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user