When we reach EOF, that means the other end dropped connection on us,
for which the ECONNRESET errno value is appropriate. However, read()
won't set that by itself, so we need to do it.
This function is also called to read data from our backend export file;
but in that case we know what the size of the export file is and won't
even try to read beyond EOF, so don't worry about that fact.
Fixes: gh-83
return -1;
}
} else {
+ errno = ECONNRESET;
return -1;
}
}