mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 05:00:31 +08:00
minor fixes
This commit is contained in:
parent
27f852ac6a
commit
9ffb517183
6
app.go
6
app.go
@ -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{}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user