- // finish by setting command to be a conclude marker.
- the_rec->_done = true;
- resp->_command = file_transfer_infoton::CONCLUDE_TRANSFER_MARKER;
- bufret = OKAY; // now it's no longer an exceptional outcome.
+ bufret = OKAY; // in either case, we don't emit a finished outcome; handled elsewhere.
+ if (!resp->_packed_data.length()) {
+ // blank packages, so finish by setting command to be a conclude marker.
+ the_rec->_done = true;
+ resp->_command = file_transfer_infoton::CONCLUDE_TRANSFER_MARKER;
+ }