[Spice-devel] [PATCH] Wait to send monitor config until agent caps are received
Marc-André Lureau
mlureau at redhat.com
Thu Aug 28 11:41:37 PDT 2014
Hi
----- Original Message -----
> > Yes, but what if the reply doesn't come after 5s, we will still get the
> > same bugs I suppose.
>
> If the reply doesn't come after 5s, then we assume that the server is
> old and doesn't support sparse monitor configurations. In this case,
> sending down a non-sparse configuration would be the correct approach,
> and not a bug. If it was simply a matter of a (very) bad network
> connection and it took longer than 5s for the server to negotiate the
> agent capabilities, then this behavior could be considered a bug. But I
> chose a large value (5s) since I thought it would be reasonable to
> assume that any server that didn't respond within this time was likely
> not to respond.
>
> >
> > As you may agree, it's best to avoid timers (some exceptions are those
> > that are user or HI related timers, such as the delay timer for monitor
> > resize)
>
> But I already explained that in the *normal* case, this timer will never
> be triggered. Once we receive the agent capabilities message (which
> should be very soon after the agent becomes connected), we will trigger
> an immediate display configuration (canceling the timer). The timer is
> only intended to be a fallback to catch the case where the capabilities
> message never arrives. If there was no fallback timer and no
> capabilities message ever arrived, we would never send a display
> configuration.
>
> Are you saying that you think that it's OK for us not to send down a
> display configuration in this situation? Maybe 5s is so long that it's
> not worth sending a configuration message anymore?
No idea if 5s is good enough, and I don't think there is an answer to this question, so it is best to avoid it. So we only do send monitor config to agents that support capabilities. It is such a basic requirement to have multi-display actually working that I don't think it is a problem.
More information about the Spice-devel
mailing list