From b455e2c8d1ddd1d8ba81703aa895b8d4d56d378e Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 17 Mar 2010 20:59:06 +0000 Subject: trivial: poll in a 10ms delay when killing the backend, to avoid the noticable delay when switching dispatchers --- src/pk-spawn.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/pk-spawn.c b/src/pk-spawn.c index 5b5880ef1..87eb981b4 100644 --- a/src/pk-spawn.c +++ b/src/pk-spawn.c @@ -461,13 +461,15 @@ pk_spawn_exit (PkSpawn *spawn) * If we run the loop, other idle events can be processed, * and this includes sending data to a new instance, * which of course will fail as the 'old' script is exiting */ - g_usleep (100*1000); /* 100 ms */ + g_usleep (10*1000); /* 10 ms */ ret = pk_spawn_check_child (spawn); - } while (ret && count++ < 50); + } while (ret && count++ < 500); /* the script exited okay */ - if (count < 50) + if (count < 500) ret = TRUE; + else + egg_warning ("failed to exit script"); out: spawn->priv->is_sending_exit = FALSE; return ret; -- cgit v1.2.3