refactor timeout for RPC server