client: fix use-after-free for client timeout