Skip to content

Commit

Permalink
use right error callback for java/jni im read/subscribe (#25453)
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhanw-google authored and pull[bot] committed Jan 25, 2024
1 parent 1fb3ce7 commit 1367882
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/controller/java/CHIPDeviceController-JNI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1295,8 +1295,7 @@ JNI_METHOD(void, subscribe)
err = readClient->SendRequest(params);
if (err != CHIP_NO_ERROR)
{
chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback->mReportCallbackRef, ErrorStr(err),
err);
callback->OnError(err);
delete readClient;
delete callback;
return;
Expand Down Expand Up @@ -1347,8 +1346,7 @@ JNI_METHOD(void, read)
err = readClient->SendRequest(params);
if (err != CHIP_NO_ERROR)
{
chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback->mReportCallbackRef, ErrorStr(err),
err);
callback->OnError(err);
delete readClient;
delete callback;
return;
Expand Down

0 comments on commit 1367882

Please sign in to comment.