- clear mAsyncResult
- return early from reads if mDisconnecting is set
Bug:
17696761
Change-Id: I98bfc3f5f06594915bd58faf71fbcded482664d2
}
Mutex::Autolock autoLock(mLock);
+ if (mDisconnecting) {
+ mCondition.signal();
+ return;
+ }
CHECK(mAsyncResult == NULL);
ALOGV("readAt offset %lld, size %zu", offset, size);
Mutex::Autolock autoLock(mLock);
+ if (mDisconnecting) {
+ return ERROR_END_OF_STREAM;
+ }
// If the request can be completely satisfied from the cache, do so.
}
if (mDisconnecting) {
+ mAsyncResult.clear();
return ERROR_END_OF_STREAM;
}