]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Don't attempt to read from a stream if it is closed
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 16 Aug 2011 23:20:58 +0000 (16:20 -0700)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 17 Aug 2011 16:44:12 +0000 (09:44 -0700)
commitdbf04dac3e89c9f19472160195bcbe6ca97e2c26
tree9d3b29ce2adf485592874651b7ea86ddc9a463bf
parent108ca333578f9f6b55da40f34b8f3becbcdf89a7
Don't attempt to read from a stream if it is closed

The I/O event callback processes incoming packets first, and then
does outgoing packets. If the incoming packet caused the stream to
close, then the attempt to process outgoing data resulted in an
error. This caused libvirt to then send an error back to the client,
but the stream had already been stopped. This confused the client
since it sees 2 error events.

* daemon/stream.c: Don't attempt read if stream is closed
daemon/stream.c