MM-27116: Drain push notification channel before closing (#15066)
* MM-27116: Drain push notification channel before closing Without this, pending push notifications will not be sent when shutting down or restarting the server. * Fix race * Re-arrange server shutdown Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d05fd5327b
Коммит
c0fa478cdd
@@ -641,7 +641,6 @@ func (s *Server) Shutdown() error {
|
||||
defer sentry.Flush(2 * time.Second)
|
||||
|
||||
s.HubStop()
|
||||
s.StopPushNotificationsHubWorkers()
|
||||
s.ShutDownPlugins()
|
||||
s.RemoveLicenseListener(s.licenseListenerId)
|
||||
s.RemoveClusterLeaderChangedListener(s.clusterLeaderListenerId)
|
||||
@@ -659,6 +658,8 @@ func (s *Server) Shutdown() error {
|
||||
|
||||
s.StopHTTPServer()
|
||||
s.stopLocalModeServer()
|
||||
// Push notification hub needs to be shutdown after HTTP server
|
||||
s.StopPushNotificationsHubWorkers()
|
||||
|
||||
s.WaitForGoroutines()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user