5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 05:19:11 +08:00

minor fixes

This commit is contained in:
Lea Anthony 2019-02-16 07:02:16 +11:00
parent 27f852ac6a
commit 9ffb517183
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
2 changed files with 4 additions and 4 deletions

6
app.go
View File

@ -53,7 +53,7 @@ func CreateApp(optionalConfig ...*AppConfig) *App {
result.config = appconfig
// Set up the CLI if not in release mode
if BuildMode != BuildModeProd {
if BuildMode != cmd.BuildModeProd {
result.cli = result.setupCli()
} else {
// Disable Inspector in release mode
@ -65,7 +65,7 @@ func CreateApp(optionalConfig ...*AppConfig) *App {
// Run the app
func (a *App) Run() error {
if BuildMode != BuildModeProd {
if BuildMode != cmd.BuildModeProd {
return a.cli.Run()
}
@ -82,7 +82,7 @@ func (a *App) start() error {
a.log.Info("Starting")
// Check if we are to run in headless mode
if BuildMode == BuildModeBridge {
if BuildMode == cmd.BuildModeBridge {
a.renderer = &Headless{}
}

View File

@ -95,7 +95,7 @@ func (h *Headless) wsBridgeHandler(w http.ResponseWriter, r *http.Request) {
http.Error(w, "Could not open websocket connection", http.StatusBadRequest)
}
h.theConnection = conn
h.log.Infof("Connection from frontend accepted.", h.theConnection)
h.log.Infof("Connection from frontend accepted [%p].", h.theConnection)
conn.SetCloseHandler(func(int, string) error {
h.log.Infof("Connection dropped [%p].", h.theConnection)
h.theConnection = nil