mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
fix connection status callbacks
This commit is contained in:
parent
4383823135
commit
26ff576727
|
@ -323,14 +323,12 @@ func (session *ExchangeSession) Init(ctx context.Context, environ *Environment)
|
|||
session.UserDataStream.OnTradeUpdate(session.OrderExecutor.EmitTradeUpdate)
|
||||
session.UserDataStream.OnOrderUpdate(session.OrderExecutor.EmitOrderUpdate)
|
||||
|
||||
if len(session.Notifiability.notifiers) > 0 {
|
||||
session.UserDataStream.OnDisconnect(func() {
|
||||
session.Notifiability.Notify("session %s user data stream disconnected", session.Name)
|
||||
})
|
||||
session.UserDataStream.OnConnect(func() {
|
||||
session.Notifiability.Notify("session %s user data stream connected", session.Name)
|
||||
})
|
||||
}
|
||||
|
||||
session.Account.BindStream(session.UserDataStream)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user