mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
Return correct error upon websocket message read failure
This fixes variable passed as error reason upon websocker message read failure. Previously a wrong variable was passed resulting in returning failure with nil error reason.
This commit is contained in:
@@ -312,7 +312,7 @@ func (c *wsStreamCreator) readDemuxLoop(bufferSize int, period time.Duration, de
|
||||
if errRead == io.EOF {
|
||||
break
|
||||
}
|
||||
c.closeAllStreamReaders(fmt.Errorf("read message: %w", err))
|
||||
c.closeAllStreamReaders(fmt.Errorf("read message: %w", errRead))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user