Skip to content

Commit b8f3880

Browse files
committed
add more comments
1 parent c4a3753 commit b8f3880

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

routers/install/install.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -587,16 +587,15 @@ func SubmitInstall(ctx *context.Context) {
587587
// Sleep for a while to make sure the user's browser has loaded the post-install page and its assets (images, css, js)
588588
// What if this duration is not long enough? That's impossible -- if the user can't load the simple page in time, how could they install or use Gitea in the future ....
589589
time.Sleep(3 * time.Second)
590-
if !setting.IsProd {
591-
time.Sleep(5 * time.Second) // sleep more for dev mode, to debug the "post-install" page
592-
}
593590

594591
// Now get the http.Server from this request and shut it down
595592
// NB: This is not our hammerable graceful shutdown this is http.Server.Shutdown
596593
srv := ctx.Value(http.ServerContextKey).(*http.Server)
597594
if err := srv.Shutdown(graceful.GetManager().HammerContext()); err != nil {
598595
log.Error("Unable to shutdown the install server! Error: %v", err)
599596
}
597+
598+
// After the HTTP server for "install" shuts down, the `runWeb()` will continue to run the "normal" server
600599
}()
601600
}
602601

0 commit comments

Comments
 (0)