Fix disconnect order.

This commit is contained in:
Unknown W. Brackets 2014-11-25 00:33:23 -08:00
parent 219d546b79
commit 6d9ff8fac4

View File

@ -342,13 +342,13 @@ size_t HTTPFileLoader::ReadAt(s64 absolutePos, size_t bytes, void *data) {
Buffer output;
client_.ReadResponseEntity(&readbuf, responseHeaders, &output);
client_.Disconnect();
if (!supportedResponse) {
ERROR_LOG(LOADER, "HTTP server did not respond with the range we wanted.");
return 0;
}
client_.Disconnect();
size_t readBytes = output.size();
output.Take(readBytes, (char *)data);
filepos_ = absolutePos + readBytes;