rpc_reconnect_requeue: return -1 if autoreconnect is not enabled

This funciton is called from rpc_service when it has detected that
a socket has errored out during reading/writing.
However, since this fucntion returns 0 (==success) for the case where
autoreconnect is not enabled, this means that for an errored socket we
will return 0 (==success) from rpc_service() back to the application.

Change rpc_reconnect_requeue to return -1 when invoked and autoreconnect
is disabled so that applications will receive an error back from rpc_service.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
libnfs-4.0.0-vitalif
Ronnie Sahlberg 2015-10-14 06:44:22 -07:00
parent 82d2a22807
commit d73d4f3305
1 changed files with 1 additions and 0 deletions

View File

@ -636,6 +636,7 @@ static int rpc_reconnect_requeue(struct rpc_context *rpc)
}
} else {
RPC_LOG(rpc, 1, "reconnect NOT initiated, auto-reconnect is disabled");
return -1;
}
return 0;