mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 16:55:15 +00:00
fix(ftx): start go routine while connecting to ftx websocket
This commit is contained in:
parent
02912f362c
commit
2394aab32e
|
@ -58,7 +58,6 @@ func NewStream(key, secret string, subAccount string, e *Exchange) *Stream {
|
||||||
|
|
||||||
s.EmitConnect()
|
s.EmitConnect()
|
||||||
})
|
})
|
||||||
go s.handleChannelKlineMessage()
|
|
||||||
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
@ -75,6 +74,7 @@ func (s *Stream) Connect(ctx context.Context) error {
|
||||||
s.ctx = ctx
|
s.ctx = ctx
|
||||||
s.isConnected = true
|
s.isConnected = true
|
||||||
s.EmitStart()
|
s.EmitStart()
|
||||||
|
go s.handleChannelKlineMessage()
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
// https://docs.ftx.com/?javascript#request-process
|
// https://docs.ftx.com/?javascript#request-process
|
||||||
|
|
Loading…
Reference in New Issue
Block a user