refactor reactor->timeout and reactor->finish.