Fix data race on server startup (#13006)

Этот коммит содержится в:
Claudio Costa
2019-11-08 20:37:15 +01:00
коммит произвёл GitHub
родитель 613a015cd0
Коммит c0c47df3f0

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

@@ -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)