binance: adjust listen key keep alive to 20 minutes

This commit is contained in:
c9s 2021-06-08 12:32:29 +08:00
parent 457ca79517
commit 0df26e0570

View File

@ -409,7 +409,7 @@ func (s *Stream) ping(ctx context.Context) {
// Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes.
// It's recommended to send a ping about every 30 minutes.
func (s *Stream) listenKeyKeepAlive(ctx context.Context, listenKey string) {
keepAliveTicker := time.NewTicker(1 * time.Minute)
keepAliveTicker := time.NewTicker(20 * time.Minute)
defer keepAliveTicker.Stop()
// if we exit, we should invalidate the existing listen key