aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@gmail.com>2020-12-15 19:33:17 +0800
committerJiri Pirko <jiri@nvidia.com>2021-01-18 14:11:58 +0100
commit6875e6c8efb0fe86766b3d4f1d0db390af6998b7 (patch)
tree2eeaf428e637643c9aad0d72817390ea305ce93e
parent61efd6de2fbb8ee077863ee5a355ac3dfd9365b9 (diff)
downloadlibteam-6875e6c8efb0fe86766b3d4f1d0db390af6998b7.tar.gz
teamd: increase the waitting time for daemon killing
In the current code, we wait for at most 5s when kill the daemon pid. But in some environment, it may need more time. Then the teamd -k will failed and return error "Failed to kill daemon: Timer expired". Let's increase the value to have enough time. Here is the reuslt with this patch: $ time libteam/teamd/teamd -k -t team0 real 0m10.442s user 0m0.017s sys 0m0.016s Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: Jiri Pirko <jiri@nvidia.com>
-rw-r--r--teamd/teamd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/teamd/teamd.c b/teamd/teamd.c
index 9360cbf..b310140 100644
--- a/teamd/teamd.c
+++ b/teamd/teamd.c
@@ -1858,7 +1858,7 @@ int main(int argc, char **argv)
break;
case DAEMON_CMD_KILL:
if (daemon_pid_file_is_running() > 0) {
- err = daemon_pid_file_kill_wait(SIGTERM, 5);
+ err = daemon_pid_file_kill_wait(SIGTERM, 30);
if (err)
teamd_log_warn("Failed to kill daemon: %s",
strerror(errno));