MM-26836: Remove some app fields which cause race conditions (#15019)

`(a *App) InitServer` was being called from multiple goroutines
and were modifying the fields of the App struct concurrently.
However, the fields were just reflecting the Server fields,
and we already have public getters for those fields.

Therefore, we remove those fields and just change the code to return
the server field directly.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Agniva De Sarker
2020-08-04 09:16:20 +05:30
коммит произвёл GitHub
родитель d22dd262ee
Коммит 339c5bae76
2 изменённых файлов: 10 добавлений и 23 удалений

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

@@ -100,7 +100,6 @@ func ServerConnector(s *Server) AppOption {
a.log = s.Log
a.notificationsLog = s.NotificationsLog
a.accountMigration = s.AccountMigration
a.cluster = s.Cluster
a.compliance = s.Compliance
a.dataRetention = s.DataRetention