From 478984e944cf95ffbff5163506213501b3ac755c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Tue, 13 Sep 2022 20:33:00 +0200 Subject: [PATCH] change shutdown order. --- server/neko.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/server/neko.go b/server/neko.go index d2ac3dbe..07ff68b4 100644 --- a/server/neko.go +++ b/server/neko.go @@ -154,23 +154,23 @@ func (neko *Neko) Start() { func (neko *Neko) Shutdown() { var err error - err = neko.broadcastManager.Shutdown() - neko.logger.Err(err).Msg("broadcast manager shutdown") - - err = neko.desktopManager.Shutdown() - neko.logger.Err(err).Msg("desktop manager shutdown") - - err = neko.captureManager.Shutdown() - neko.logger.Err(err).Msg("capture manager shutdown") - - err = neko.webRTCManager.Shutdown() - neko.logger.Err(err).Msg("webrtc manager shutdown") + err = neko.server.Shutdown() + neko.logger.Err(err).Msg("server shutdown") err = neko.webSocketHandler.Shutdown() neko.logger.Err(err).Msg("websocket handler shutdown") - err = neko.server.Shutdown() - neko.logger.Err(err).Msg("server shutdown") + err = neko.webRTCManager.Shutdown() + neko.logger.Err(err).Msg("webrtc manager shutdown") + + err = neko.captureManager.Shutdown() + neko.logger.Err(err).Msg("capture manager shutdown") + + err = neko.desktopManager.Shutdown() + neko.logger.Err(err).Msg("desktop manager shutdown") + + err = neko.broadcastManager.Shutdown() + neko.logger.Err(err).Msg("broadcast manager shutdown") } func (neko *Neko) ServeCommand(cmd *cobra.Command, args []string) {