mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
Fix data race on server startup (#13006)
This commit is contained in:
@@ -72,16 +72,16 @@ func runServer(configStore config.Store, disableConfigWatch bool, usedPlatform b
|
||||
mlog.Error("The platform binary has been deprecated, please switch to using the mattermost binary.")
|
||||
}
|
||||
|
||||
api := api4.Init(server, server.AppOptions, server.Router)
|
||||
wsapi.Init(server.FakeApp(), server.WebSocketRouter)
|
||||
web.New(server, server.AppOptions, server.Router)
|
||||
|
||||
serverErr := server.Start()
|
||||
if serverErr != nil {
|
||||
mlog.Critical(serverErr.Error())
|
||||
return serverErr
|
||||
}
|
||||
|
||||
api := api4.Init(server, server.AppOptions, server.Router)
|
||||
wsapi.Init(server.FakeApp(), server.WebSocketRouter)
|
||||
web.New(server, server.AppOptions, server.Router)
|
||||
|
||||
// If we allow testing then listen for manual testing URL hits
|
||||
if *server.Config().ServiceSettings.EnableTesting {
|
||||
manualtesting.Init(api)
|
||||
|
||||
Reference in New Issue
Block a user