Skip to content

Commit

Permalink
fix: cancelTechnology might cause exception if there's a connected tag
Browse files Browse the repository at this point in the history
session
  • Loading branch information
whitedogg13 committed Aug 18, 2019
1 parent 907960a commit af2f1f9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ public void cancelTechnologyRequest(Callback callback) {
synchronized(this) {
if (techRequest != null) {
techRequest.close();
techRequest.getPendingCallback().invoke("cancelled");
try {
techRequest.getPendingCallback().invoke("cancelled");
} catch (RuntimeException ex) {
// the pending callback might already been invoked when there is an ongoing
// connected tag, bypass this case explicitly
}
techRequest = null;
callback.invoke();
} else {
Expand Down

0 comments on commit af2f1f9

Please sign in to comment.