mirror of
https://github.com/Monibuca/engine.git
synced 2025-10-05 08:36:56 +08:00
feat: add waitGroup
This commit is contained in:
2
http.go
2
http.go
@@ -53,6 +53,8 @@ func (conf *GlobalConfig) API_summary(rw http.ResponseWriter, r *http.Request) {
|
||||
if !summary.Running() {
|
||||
summary.collect()
|
||||
}
|
||||
summary.rw.RLock()
|
||||
defer summary.rw.RUnlock()
|
||||
if y {
|
||||
if err := yaml.NewEncoder(rw).Encode(&summary); err != nil {
|
||||
http.Error(rw, err.Error(), http.StatusInternalServerError)
|
||||
|
Reference in New Issue
Block a user