Adjusted code for changes in WAIT-UNTIL-FD-READY.