On 12/4/24 10:44, Konstantin Kostiuk wrote:

> 
> The old flow:
> run_agent call run_agent_once in loop
> run_agent_once initialize channel for every run
> 
> after your changes
> you expect to initialize the channel only once
> this can cause issues on Windows during driver update
> the default configuration on Windows is QGA + VirtioSerial and in CLI --
> retry-path
> during driver update (that can happen via Windows Update) the channel
> will be closed
> so QGA must reinitialize the channel

Ah, I had no idea. Alright, so what I can do is:

1) keep channel_init() in initialize_agent() and become_daemon() after
that, and
2) make run_agent_once() call channel_init() if s->channel is NULL (and
also set it to NULL ...

> 
> Theoretically, the same can happen on Linux with a UNIX socket
> 
>  
> 
>          g_main_loop_run(s->main_loop);
> 
>          if (s->channel) {

... here.

V2 coming up.

Michal


Reply via email to