summaryrefslogtreecommitdiff
path: root/services/bufferhub/BufferClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/bufferhub/BufferClient.cpp')
-rw-r--r--services/bufferhub/BufferClient.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/bufferhub/BufferClient.cpp b/services/bufferhub/BufferClient.cpp
index e312011696..ec7e535699 100644
--- a/services/bufferhub/BufferClient.cpp
+++ b/services/bufferhub/BufferClient.cpp
@@ -41,6 +41,14 @@ BufferClient* BufferClient::create(BufferHubService* service,
}
BufferClient::~BufferClient() {
+ {
+ std::lock_guard<std::mutex> lock(mClosedMutex);
+ if (!mClosed) {
+ ALOGW("%s: client of buffer #%d destroyed without close. Closing it now.", __FUNCTION__,
+ mBufferNode->id());
+ }
+ }
+
close();
}