mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
fix: regression in internode bytes counting (#18880)
wire up missing metrics since #18461 Bonus: fix trace output inconsistency
This commit is contained in:
@@ -757,6 +757,10 @@ func (c *Connection) receive(conn net.Conn, r receiver) error {
|
||||
if op != ws.OpBinary {
|
||||
return fmt.Errorf("unexpected connect response type %v", op)
|
||||
}
|
||||
if c.incomingBytes != nil {
|
||||
c.incomingBytes(int64(len(b)))
|
||||
}
|
||||
|
||||
var m message
|
||||
_, _, err = m.parse(b)
|
||||
if err != nil {
|
||||
@@ -938,9 +942,6 @@ 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)
|
||||
|
||||
Reference in New Issue
Block a user