examples/usrsocktest: add some delay to wait the daemon task ready
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
45a21aea8e
commit
6bc5196ff0
@ -2053,6 +2053,12 @@ errout_closepipe:
|
|||||||
out:
|
out:
|
||||||
pthread_mutex_unlock(&daemon_mutex);
|
pthread_mutex_unlock(&daemon_mutex);
|
||||||
usrsocktest_dbg("ret: %d\n", ret);
|
usrsocktest_dbg("ret: %d\n", ret);
|
||||||
|
|
||||||
|
if (ret == OK)
|
||||||
|
{
|
||||||
|
usleep(100);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2329,6 +2335,11 @@ bool usrsocktest_send_delayed_command(const char cmd,
|
|||||||
|
|
||||||
sq_addlast(&delayed_cmd->node, &priv->delayed_cmd_threads);
|
sq_addlast(&delayed_cmd->node, &priv->delayed_cmd_threads);
|
||||||
|
|
||||||
|
if (ret == OK)
|
||||||
|
{
|
||||||
|
usleep(100);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user