Leave while one can or has the chance to. Examples: He just had a good offer from a rival firm and decided to get out while the getting is good.