mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
BTSE: Fix JSONDecode error upon successful websocket connection
BTSE updated their websocket API to send a "connect success" message upon a successful connection
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
"github.com/thrasher-/gocryptotrader/currency"
|
||||
exchange "github.com/thrasher-/gocryptotrader/exchanges"
|
||||
"github.com/thrasher-/gocryptotrader/exchanges/orderbook"
|
||||
log "github.com/thrasher-/gocryptotrader/logger"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -122,6 +123,14 @@ func (b *BTSE) WsHandleData() {
|
||||
ProductID string `json:"product_id"`
|
||||
}
|
||||
|
||||
if strings.Contains(string(resp.Raw), "connect success") {
|
||||
if b.Verbose {
|
||||
log.Debugf("%s websocket client successfully connected to %s",
|
||||
b.Name, b.Websocket.GetWebsocketURL())
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
msgType := MsgType{}
|
||||
err = common.JSONDecode(resp.Raw, &msgType)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user