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

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

commit 088075ce7fc017a6ec57a9f03b9795c3ea073734
Author: Marco Casaroli <[email protected]>
AuthorDate: Tue Nov 3 12:21:47 2026 +0100

    fs/nfs: Reconnect also when a request fails with EPIPE.
    
    nfs_request() connects to the server again when an RPC request fails
    with -ENOTCONN, for example after the server closed an idle TCP
    connection.  The send on a TCP connection that the peer closed fails
    with -EPIPE in POSIX, and the TCP send of NuttX is changed to return
    it.  Reconnect for -EPIPE 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 72206562e69..c170168f7b3 100644
--- a/fs/nfs/nfs_util.c
+++ b/fs/nfs/nfs_util.c
@@ -131,7 +131,7 @@ int nfs_request(FAR struct nfsmount *nmp, int procnum,
     {
       ferr("ERROR: rpcclnt_request failed: %d\n", error);
 
-      if (error != -ENOTCONN)
+      if (error != -ENOTCONN && error != -EPIPE)
         {
           return error;
         }

Reply via email to