mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
stream: make ping method private
This commit is contained in:
parent
a66070d286
commit
e12178b51a
|
@ -233,7 +233,7 @@ func (s *StandardStream) Read(ctx context.Context, conn *websocket.Conn, cancel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StandardStream) Ping(ctx context.Context, conn *websocket.Conn, cancel context.CancelFunc, interval time.Duration) {
|
func (s *StandardStream) ping(ctx context.Context, conn *websocket.Conn, cancel context.CancelFunc, interval time.Duration) {
|
||||||
defer func() {
|
defer func() {
|
||||||
cancel()
|
cancel()
|
||||||
log.Debug("ping worker stopped")
|
log.Debug("ping worker stopped")
|
||||||
|
@ -325,7 +325,7 @@ func (s *StandardStream) DialAndConnect(ctx context.Context) error {
|
||||||
s.EmitConnect()
|
s.EmitConnect()
|
||||||
|
|
||||||
go s.Read(connCtx, conn, connCancel)
|
go s.Read(connCtx, conn, connCancel)
|
||||||
go s.Ping(connCtx, conn, connCancel, pingInterval)
|
go s.ping(connCtx, conn, connCancel, pingInterval)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user