More debug in read_into

This commit is contained in:
Isaac Connor 2021-04-17 11:32:04 -04:00
parent 1d034b16dd
commit a0d08b8277
1 changed files with 3 additions and 2 deletions

View File

@ -65,8 +65,9 @@ unsigned int Buffer::expand(unsigned int count) {
int Buffer::read_into(int sd, unsigned int bytes) {
// Make sure there is enough space
this->expand(bytes);
int bytes_read = read(sd, mTail, bytes);
if ( bytes_read > 0 ) {
Debug(3, "Reading %u btes", bytes);
int bytes_read = ::read(sd, mTail, bytes);
if (bytes_read > 0) {
mTail += bytes_read;
mSize += bytes_read;
}