Perform the timeout scan at the start of the service routine instead of the end.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
libnfs-4.0.0-vitalif
Ronnie Sahlberg 2017-07-01 06:39:02 +10:00
parent 1e01500007
commit 36a1e0662c
1 changed files with 2 additions and 1 deletions

View File

@ -394,6 +394,8 @@ int rpc_service(struct rpc_context *rpc, int revents)
{
assert(rpc->magic == RPC_CONTEXT_MAGIC);
rpc_timeout_scan(rpc);
if (revents == -1 || revents & (POLLERR|POLLHUP)) {
if (revents != -1 && revents & POLLERR) {
@ -470,7 +472,6 @@ int rpc_service(struct rpc_context *rpc, int revents)
}
}
rpc_timeout_scan(rpc);
return 0;
}