fix a data race in the platform service (#21242)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2022-10-06 14:14:03 +03:00
коммит произвёл GitHub
родитель 5e69c6b02f
Коммит 10655a2eb3
5 изменённых файлов: 40 добавлений и 35 удалений

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

@@ -305,8 +305,8 @@ func NewServer(options ...Option) (*Server, error) {
// It is important to initialize the hub only after the global logger is set
// to avoid race conditions while logging from inside the hub.
// Step 5: Hub depends on s.Channels() (step 8)
s.platform.HubStart(New(ServerConnector(s.Channels())))
// Step 5: Start hub in platform which the hub depends on s.Channels() (step 4)
s.platform.Start(New(ServerConnector(s.Channels())))
// -------------------------------------------------------------------------
// Everything below this is not order sensitive and safe to be moved around.