You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2023/08/25 17:39:06 UTC

[nuttx] branch master updated: tcp_send_buffered: change Not connected message level from error to warning

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

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 32b1af3008 tcp_send_buffered: change Not connected message level from error to warning
32b1af3008 is described below

commit 32b1af30088bbbf879ae46db27d0f9198f503dbd
Author: zhanghongyu <zh...@xiaomi.com>
AuthorDate: Thu Aug 24 21:10:34 2023 +0800

    tcp_send_buffered: change Not connected message level from error to warning
    
    Non-blocking sockets are almost never in the connected state when app try to
    get result of connect success through poll, to avoid confusion because of
    this error print, so downgrade the print level to warning.
    
    Signed-off-by: zhanghongyu <zh...@xiaomi.com>
---
 net/tcp/tcp_send_buffered.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tcp/tcp_send_buffered.c b/net/tcp/tcp_send_buffered.c
index 4b6f4ba53b..8c480a231f 100644
--- a/net/tcp/tcp_send_buffered.c
+++ b/net/tcp/tcp_send_buffered.c
@@ -1663,7 +1663,7 @@ int psock_tcp_cansend(FAR struct tcp_conn_s *conn)
 
   if (!_SS_ISCONNECTED(conn->sconn.s_flags))
     {
-      nerr("ERROR: Not connected\n");
+      nwarn("WARNING: Not connected\n");
       return -ENOTCONN;
     }