mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
change to debug level message
This commit is contained in:
parent
b637d46c83
commit
6030a62cf0
|
@ -309,6 +309,7 @@ func (s *Stream) dial(listenKey string) (*websocket.Conn, error) {
|
|||
// Unsolicited pong frames are allowed.
|
||||
conn.SetPingHandler(nil)
|
||||
conn.SetPongHandler(func(string) error {
|
||||
log.Debugf("websocket <- received pong")
|
||||
if err := conn.SetReadDeadline(time.Now().Add(readTimeout * 2)); err != nil {
|
||||
log.WithError(err).Error("pong handler can not set read deadline")
|
||||
}
|
||||
|
@ -451,7 +452,7 @@ func (s *Stream) ping(ctx context.Context) {
|
|||
conn := s.Conn
|
||||
s.ConnLock.Unlock()
|
||||
|
||||
log.Infof("websocket ping")
|
||||
log.Debugf("websocket -> ping")
|
||||
if err := conn.WriteControl(websocket.PingMessage, nil, time.Now().Add(writeTimeout)); err != nil {
|
||||
log.WithError(err).Error("ping error", err)
|
||||
s.Reconnect()
|
||||
|
|
Loading…
Reference in New Issue
Block a user