Remove app initialization from WebHub (#18687)
- Make it a Server method. - Pass Server instead of App. - Remove global app instance from NewServer, rather create local instances whenever needed. - Remove App from Websocket router, and create dynamically on every request. - Remove HubStart and HubStop from App methods. - Explicitly using s.Log instead of the global logger to indicate dependency on Server. We could have passed the logger explicitly but it doesn't look ideal. ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
609fea0002
Коммит
d949bd1638
@@ -153,7 +153,7 @@ func Fuzz(data []byte) int {
|
||||
|
||||
s := httptest.NewServer(dummyWebsocketHandler())
|
||||
|
||||
th.App.HubStart()
|
||||
th.Server.HubStart()
|
||||
|
||||
u1 := th.CreateUser()
|
||||
u2 := th.CreateUser()
|
||||
|
||||
Ссылка в новой задаче
Block a user