mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +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() {
|
||||
cancel()
|
||||
log.Debug("ping worker stopped")
|
||||
|
@ -325,7 +325,7 @@ func (s *StandardStream) DialAndConnect(ctx context.Context) error {
|
|||
s.EmitConnect()
|
||||
|
||||
go s.Read(connCtx, conn, connCancel)
|
||||
go s.Ping(connCtx, conn, connCancel, pingInterval)
|
||||
go s.ping(connCtx, conn, connCancel, pingInterval)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user