From 7743d952dc16ccab26ca9240855089535e548062 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sun, 28 Jan 2024 14:35:53 -0800 Subject: [PATCH] fix: incomingBytes() to update via handleMessages() (#18891) previous change #18880 was incomplete --- internal/grid/connection.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/grid/connection.go b/internal/grid/connection.go index 06a5f8284..a9eca99df 100644 --- a/internal/grid/connection.go +++ b/internal/grid/connection.go @@ -956,6 +956,10 @@ func (c *Connection) handleMessages(ctx context.Context, conn net.Conn) { logger.LogIfNot(ctx, fmt.Errorf("ws read: %w", err), net.ErrClosed, io.EOF) return } + if c.incomingBytes != nil { + c.incomingBytes(int64(len(msg))) + } + // Parse the received message var m message subID, remain, err := m.parse(msg)