mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-27 23:49:04 +00:00
server: Don't stop writing agent data to the guest when the client disconnects
write_to_vdi_port() was checking for reds->agent_state.connected to determine wether it could write queued data. But agent_state.connected reflects if *both* ends are connected. If the client has disconnected, but the guest agent is still connected and some data is still pending (like a final clipboard release from the client), then this data should be written to the guest agent.
This commit is contained in:
parent
ef6886732e
commit
7cc85f33be
@ -1170,12 +1170,12 @@ static int write_to_vdi_port()
|
||||
int total = 0;
|
||||
int n;
|
||||
|
||||
if (!reds->agent_state.connected || reds->mig_target) {
|
||||
if (!vdagent || reds->mig_target) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
sif = SPICE_CONTAINEROF(vdagent->base.sif, SpiceCharDeviceInterface, base);
|
||||
while (reds->agent_state.connected) {
|
||||
while (vdagent) {
|
||||
if (!(ring_item = ring_get_tail(&state->write_queue))) {
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user