stream: set connection monitor delay. (#1120)

* stream: set connection monitor delay.

- this fixes a bug where the connection monitor delay config value does not
get set to the websocket on intialization.

* multi: add connection monitor delay to exchange config.

- this adds the connection monitor delay config option to the exchange type.
- the validate function of the exchange type has been updated to validate the
connection monitor delay value as well.

* multi: resolve review issues.
This commit is contained in:
Donald Adu-Poku
2023-01-30 22:21:51 +00:00
committed by GitHub
parent b079049e9a
commit 82c79a9287
26 changed files with 200 additions and 172 deletions

View File

@@ -171,13 +171,14 @@ func (z *ZB) Setup(exch *config.Exchange) error {
}
err = z.Websocket.Setup(&stream.WebsocketSetup{
ExchangeConfig: exch,
DefaultURL: zbWebsocketAPI,
RunningURL: wsRunningURL,
Connector: z.WsConnect,
GenerateSubscriptions: z.GenerateDefaultSubscriptions,
Subscriber: z.Subscribe,
Features: &z.Features.Supports.WebsocketCapabilities,
ExchangeConfig: exch,
DefaultURL: zbWebsocketAPI,
RunningURL: wsRunningURL,
Connector: z.WsConnect,
GenerateSubscriptions: z.GenerateDefaultSubscriptions,
ConnectionMonitorDelay: exch.ConnectionMonitorDelay,
Subscriber: z.Subscribe,
Features: &z.Features.Supports.WebsocketCapabilities,
})
if err != nil {
return err