Skip to content

Commit

Permalink
feat:优化web程序采用独立协程运行
Browse files Browse the repository at this point in the history
  • Loading branch information
microrain authored and microrain committed Apr 21, 2024
1 parent 84ceee1 commit 9874cd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ func RunServer(ctx context.Context, stopSignal chan os.Signal) {
s.EnableHTTPS(certFile, keyFile)
}

s.Run()
go s.Run()
select {
case <-ctx.Done():
}
stopSignal <- syscall.SIGQUIT
}()
return
Expand Down

0 comments on commit 9874cd3

Please sign in to comment.