mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 10:00:27 +00:00
fix: prevent native requests from blocking shutdown
This commit is contained in:
1 parent
1bb3f74c9f
commit
d51eeb3f2c
7 files changed
+317
-159
No files matched your search
+1
-1
@@ -18,8 +18,8 @@ const (
|
||||
// API Service without opening an HTTP listener.
|
||||
func Dispatch(method, path, rawQuery, body string) string {
|
||||
runtimeMu.RLock()
|
||||
defer runtimeMu.RUnlock()
|
||||
service := APIService
|
||||
runtimeMu.RUnlock()
|
||||
if service == nil {
|
||||
return marshalInvokeResult(model.NewErrorResult("service not started"))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user