provide any pending input to a filedescriptor before checking for expiration

but before flushing any pending output