[PATCH] shell: avoid endless sending event when meeting hanged-not-exited client
Juan Zhao
juan.j.zhao at linux.intel.com
Wed Jul 11 01:41:18 PDT 2012
On Tue, 2012-07-10 at 08:52 -0400, Kristian Høgsberg wrote:
> On Tue, Jul 10, 2012 at 01:20:24AM -0700,
> juan.j.zhao at linux.intel.com wrote:
> > From: Juan Zhao <juan.j.zhao at linux.intel.com>
> >
> > When the client was hanged and not responsible for a long time, the
> server will generate
> > endless and useless "set_busy_cursor" related events. And finally,
> weston crashed, with
> > error message:"read error from connection 0x823b560: Connection
> reset by peer (104)
> > read error: Connection reset by peer".
> > It's not necessary for shell-server to set_busy_cursor again and
> again. So if the client
> > is already unresponsive, we don't need to set new events.
>
> I think we need to test for "already unresponsive" in ping_handler
> instead, and just return early there if the surface is already deemed
> unresponsive.
ping handler won't meet such problem, because it will check whether
"ping_timer" exists. If it already existed, ping_handler will do
nothing.
And ping_timeout_handler will be called again and again, if the client
doesn't response.
So we still need to add this check inside ping_timeout_handler.
> Oh, and please keep commit message lines less than 80 characters wide.
Sorry for it, will update it.
Thanks,
Juan
>
> thanks,
> Kristian
More information about the wayland-devel
mailing list