You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/09/01 06:58:19 UTC

[incubator-nuttx-apps] 05/06: examples/usrsocktest: add some delay to wait the daemon task ready

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 6bc5196ff058b77f1e62d2283755728f7a2ee6f2
Author: chao an <an...@xiaomi.com>
AuthorDate: Wed Aug 31 23:05:38 2022 +0800

    examples/usrsocktest: add some delay to wait the daemon task ready
    
    Signed-off-by: chao an <an...@xiaomi.com>
---
 examples/usrsocktest/usrsocktest_daemon.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/examples/usrsocktest/usrsocktest_daemon.c b/examples/usrsocktest/usrsocktest_daemon.c
index f9c80f84b..849339ab1 100644
--- a/examples/usrsocktest/usrsocktest_daemon.c
+++ b/examples/usrsocktest/usrsocktest_daemon.c
@@ -2053,6 +2053,12 @@ errout_closepipe:
 out:
   pthread_mutex_unlock(&daemon_mutex);
   usrsocktest_dbg("ret: %d\n", ret);
+
+  if (ret == OK)
+    {
+      usleep(100);
+    }
+
   return ret;
 }
 
@@ -2329,6 +2335,11 @@ bool usrsocktest_send_delayed_command(const char cmd,
 
   sq_addlast(&delayed_cmd->node, &priv->delayed_cmd_threads);
 
+  if (ret == OK)
+    {
+      usleep(100);
+    }
+
   return true;
 }