a task to handle the rpc state