only read twice when the previous read returned max bytes