From ba0f076c6676107491e8d7b4269e3eadb5ecdce3 Mon Sep 17 00:00:00 2001 From: deranjer Date: Fri, 16 Feb 2018 20:41:09 -0500 Subject: [PATCH] cleaning up an issue with client config generation --- .vscode/tasks.json | 6 +++--- engine/clientConnectGenerate.go | 4 ++++ main.go | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 3c29913e..a560390c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,7 +1,7 @@ { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format - "version": "2.0.0", + "version": "2.0.0", "tasks": [ { "taskName": "Run Program", @@ -12,9 +12,9 @@ ] }, { - "taskName": "Build GopherJS", + "taskName": "goReleaser Snapshot", "type": "shell", - "command": "C:/Users/deranjer/go/bin/gopherjs.exe build C:/Users/deranjer/GoglandProjects/torrent-project/public/static/js/frontend-websocket.go", + "command": "C:/Users/deranjer/go/bin/goreleaser.exe -rm-dist -snapshot", "problemMatcher": [ "$go" ] diff --git a/engine/clientConnectGenerate.go b/engine/clientConnectGenerate.go index 4de677be..85d754c0 100644 --- a/engine/clientConnectGenerate.go +++ b/engine/clientConnectGenerate.go @@ -36,6 +36,10 @@ func GenerateClientConfigFile(config FullClientSettings, authString string) { const ClientUsername = "` + config.ClientUsername + `" const ClientPassword = "` + config.ClientPassword + `" ` + } else { + webUIAuth = ` + const LoginRequired = false + ` } if config.UseProxy { diff --git a/main.go b/main.go index 905322d1..793173a2 100644 --- a/main.go +++ b/main.go @@ -192,6 +192,7 @@ func main() { router.HandleFunc("/websocket", func(w http.ResponseWriter, r *http.Request) { //websocket is the main data pipe to the frontend conn, err := upgrader.Upgrade(w, r, nil) + fmt.Println("Websocket connection here") defer conn.Close() //defer closing the websocket until done. if err != nil { Logger.WithFields(logrus.Fields{"error": err}).Fatal("Unable to create websocket!")