app/platform: fix an issue about accessing to a closed db on shutdown (#21549)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2022-10-31 15:58:35 +03:00
коммит произвёл GitHub
родитель b31e6f2149
Коммит c6b6b3313e
4 изменённых файлов: 32 добавлений и 9 удалений

Просмотреть файл

@@ -706,8 +706,6 @@ func (s *Server) Shutdown() {
s.StopPushNotificationsHubWorkers()
s.htmlTemplateWatcher.Close()
s.WaitForGoroutines()
s.platform.StopSearchEngine()
s.Audit.Shutdown()
@@ -814,11 +812,6 @@ func (s *Server) GoBuffered(f func()) {
s.platform.GoBuffered(f)
}
// WaitForGoroutines blocks until all goroutines created by App.Go exit.
func (s *Server) WaitForGoroutines() {
s.platform.WaitForGoroutines()
}
var corsAllowedMethods = []string{
"POST",
"GET",