mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-14 02:53:50 +00:00
ftx: panic if subscribe unsupported channel
This commit is contained in:
parent
66f165584f
commit
f912fde6e3
|
@ -54,7 +54,6 @@ func NewStream(key, secret string) *Stream {
|
||||||
func (s *Stream) Connect(ctx context.Context) error {
|
func (s *Stream) Connect(ctx context.Context) error {
|
||||||
// If it's not public only, let's do the authentication.
|
// If it's not public only, let's do the authentication.
|
||||||
if atomic.LoadInt32(&s.publicOnly) == 0 {
|
if atomic.LoadInt32(&s.publicOnly) == 0 {
|
||||||
logger.Infof("subscribe private events")
|
|
||||||
s.subscribePrivateEvents()
|
s.subscribePrivateEvents()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,8 +104,7 @@ func (s *Stream) SetPublicOnly() {
|
||||||
|
|
||||||
func (s *Stream) Subscribe(channel types.Channel, symbol string, _ types.SubscribeOptions) {
|
func (s *Stream) Subscribe(channel types.Channel, symbol string, _ types.SubscribeOptions) {
|
||||||
if channel != types.BookChannel {
|
if channel != types.BookChannel {
|
||||||
logger.Errorf("only support orderbook channel")
|
panic("only support book channel now")
|
||||||
return
|
|
||||||
}
|
}
|
||||||
s.addSubscription(websocketRequest{
|
s.addSubscription(websocketRequest{
|
||||||
Operation: subscribe,
|
Operation: subscribe,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user