mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-06 20:27:43 +00:00
spicevmc: Do not call destroy while disconnecting
"RedChannelClient::on_disconnect", which for SpiceVMC is bound to "spicevmc_red_channel_client_on_disconnect", is called while the RedChannel object is disconnecting. More precisely is called after the object has been removed from RedChannel causing "red_channel_client_is_connected" to be false. Calling "red_channel_client_destroy" this will lead to a no-op as function will set "destroying" and call "red_channel_client_disconnect" which will just exit finding "red_channel_client_is_connected" false. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
parent
c5127b9d0e
commit
53c989a686
@ -437,11 +437,6 @@ static void spicevmc_red_channel_client_on_disconnect(RedChannelClient *rcc)
|
||||
}
|
||||
}
|
||||
|
||||
/* Don't destroy the rcc if it is already being destroyed, as then
|
||||
red_client_destroy/red_channel_client_destroy will already do this! */
|
||||
if (!red_channel_client_is_destroying(rcc))
|
||||
red_channel_client_destroy(rcc);
|
||||
|
||||
channel->rcc = NULL;
|
||||
sif = spice_char_device_get_interface(channel->chardev_sin);
|
||||
if (sif->state) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user