mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-24 23:16:52 +00:00
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:
@@ -166,14 +166,15 @@ func (b *Bittrex) Setup(exch *config.Exchange) error {
|
||||
|
||||
// Websocket details setup below
|
||||
err = b.Websocket.Setup(&stream.WebsocketSetup{
|
||||
ExchangeConfig: exch,
|
||||
DefaultURL: bittrexAPIWSURL, // Default ws endpoint so we can roll back via CLI if needed.
|
||||
RunningURL: wsRunningEndpoint,
|
||||
Connector: b.WsConnect, // Connector function outlined above.
|
||||
Subscriber: b.Subscribe, // Subscriber function outlined above.
|
||||
Unsubscriber: b.Unsubscribe, // Unsubscriber function outlined above.
|
||||
GenerateSubscriptions: b.GenerateDefaultSubscriptions, // GenerateDefaultSubscriptions function outlined above.
|
||||
Features: &b.Features.Supports.WebsocketCapabilities, // Defines the capabilities of the websocket outlined in supported features struct. This allows the websocket connection to be flushed appropriately if we have a pair/asset enable/disable change. This is outlined below.
|
||||
ExchangeConfig: exch,
|
||||
DefaultURL: bittrexAPIWSURL, // Default ws endpoint so we can roll back via CLI if needed.
|
||||
RunningURL: wsRunningEndpoint,
|
||||
Connector: b.WsConnect, // Connector function outlined above.
|
||||
Subscriber: b.Subscribe, // Subscriber function outlined above.
|
||||
Unsubscriber: b.Unsubscribe, // Unsubscriber function outlined above.
|
||||
GenerateSubscriptions: b.GenerateDefaultSubscriptions, // GenerateDefaultSubscriptions function outlined above.
|
||||
ConnectionMonitorDelay: exch.ConnectionMonitorDelay,
|
||||
Features: &b.Features.Supports.WebsocketCapabilities, // Defines the capabilities of the websocket outlined in supported features struct. This allows the websocket connection to be flushed appropriately if we have a pair/asset enable/disable change. This is outlined below.
|
||||
OrderbookBufferConfig: buffer.Config{
|
||||
SortBuffer: true,
|
||||
SortBufferByUpdateIDs: true,
|
||||
|
||||
Reference in New Issue
Block a user