mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
binance: invert if
This commit is contained in:
parent
cf07ca7aa0
commit
eefee46e9b
|
@ -448,9 +448,7 @@ func (s *Stream) listenKeyKeepAlive(ctx context.Context, listenKey string) {
|
||||||
case <-keepAliveTicker.C:
|
case <-keepAliveTicker.C:
|
||||||
for i := 0; i < 5; i++ {
|
for i := 0; i < 5; i++ {
|
||||||
err := s.keepaliveListenKey(ctx, listenKey)
|
err := s.keepaliveListenKey(ctx, listenKey)
|
||||||
if err == nil {
|
if err != nil {
|
||||||
break
|
|
||||||
} else {
|
|
||||||
time.Sleep(5 * time.Second)
|
time.Sleep(5 * time.Second)
|
||||||
switch err.(type) {
|
switch err.(type) {
|
||||||
case net.Error:
|
case net.Error:
|
||||||
|
@ -463,6 +461,8 @@ func (s *Stream) listenKeyKeepAlive(ctx context.Context, listenKey string) {
|
||||||
return
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user