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
```
Этот коммит содержится в:
Agniva De Sarker
2021-10-18 12:36:13 +05:30
коммит произвёл GitHub
родитель 609fea0002
Коммит d949bd1638
7 изменённых файлов: 50 добавлений и 102 удалений

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

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