fix: incomingBytes() to update via handleMessages() (#18891)

previous change #18880 was incomplete
This commit is contained in:
Harshavardhana 2024-01-28 14:35:53 -08:00 committed by GitHub
parent 944f3c1477
commit 7743d952dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)