On a Tuesday in 2026, Daniel P. Berrangé via Devel wrote:
From: Daniel P. Berrangé <[email protected]>

A recent commit caused the virFDStreamRead method to loop reading data
until the provided buffer is full. Unfortunately the EOF handling was
not quiet correct.


*quite

Jano

* When seeing a virFDStreamMsg with length zero, it would still
  loop trying to read more and then get an error that the thread
  has quit.

* When seeing a virFDStreamMsg with length zero on subsequent
  iterations, it would discard this message, which would in turn
  prevent the caller from ever seeing the 'ret == 0' return value
  indicating EOF. The caller would then try to read again and get
  an error about the stream being closed.

Fixes: e23fd0b7fd36c41e6db49df4f4962762d3ef6ab0
Reported-by: Roman Bogorodskiy <[email protected]>
Signed-off-by: Daniel P. Berrangé <[email protected]>

Attachment: signature.asc
Description: PGP signature

Reply via email to