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

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

commit 86f35ac465c010e2053aed05e9e7d2a1e1ae57c8
Author: Marco Casaroli <[email protected]>
AuthorDate: Wed Nov 18 19:42:11 2026 +0100

    fs/nfs: Reconnect also when a request fails with ECONNRESET.
    
    nfs_request() connects to the server again when an RPC request fails
    with -ENOTCONN or -EPIPE, for example after the server closed an idle
    TCP connection.  When the server resets the connection, the first
    receive or send on it fails with -ECONNRESET in POSIX, and the TCP
    stack of NuttX is changed to return it.  Reconnect for -ECONNRESET too,
    so that the reconnect continues to work.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 fs/nfs/nfs_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/nfs_util.c b/fs/nfs/nfs_util.c
index 0ce5c03026b..ab594951706 100644
--- a/fs/nfs/nfs_util.c
+++ b/fs/nfs/nfs_util.c
@@ -372,7 +372,7 @@ int nfs_request(FAR struct nfsmount *nmp, int procnum,
     {
       ferr("ERROR: rpcclnt_request failed: %d\n", error);
 
-      if (error != -ENOTCONN && error != -EPIPE)
+      if (error != -ENOTCONN && error != -EPIPE && error != -ECONNRESET)
         {
           return error;
         }

Reply via email to