Breast milk

How long can freshly expressed breastmilk stay out before putting it into the refrigerator? My baby didn’t wake up in the middle of the night and I would hate to dump 4oz of milk.