summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2010-03-17 20:59:06 +0000
committerRichard Hughes <richard@hughsie.com>2010-03-17 20:59:06 +0000
commitb455e2c8d1ddd1d8ba81703aa895b8d4d56d378e (patch)
tree603f3591bbcfe97d4eb67bf7c177af1afdae335b /src
parentd7ab5d0d48a9c970c3d4a5f7ac4fb2d83b74ea0d (diff)
trivial: poll in a 10ms delay when killing the backend, to avoid the noticable delay when switching dispatchers
Diffstat (limited to 'src')
-rw-r--r--src/pk-spawn.c8
1 files changed, 5 insertions, 3 deletions
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;