Skip to content

Commit

Permalink
Fix double opening of a browser when -o -m is passed in
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Jul 13, 2024
1 parent ee5bc13 commit 4e3ad3e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions engine/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,6 @@ func (ac *Config) Serve(mux *http.ServeMux, done, ready chan bool) error {
}
servingHTTP.Store(true)
HTTPserver := ac.NewFastHTTPServer(mux, ac.serverAddr)
// Open the URL before the serving has started, in a short delay
if ac.openURLAfterServing {
go func() {
time.Sleep(delayBeforeLaunchingBrowser)
ac.OpenURL(ac.serverHost, ac.serverAddr, false)
}()
}
// Start serving. Shut down gracefully at exit.
if err := HTTPserver.ListenAndServe(ac.serverAddr); err != nil {
servingHTTP.Store(false)
Expand Down

0 comments on commit 4e3ad3e

Please sign in to comment.