Merge "Do not leak Future when CompanionTransportManager.sendMessage() thows"

This commit is contained in:
TreeHugger Robot
2022-06-30 14:49:02 +00:00
committed by Android (Google) Code Review

View File

@@ -200,6 +200,9 @@ public class CompanionTransportManager {
try {
sendMessage(message, sequence, data);
} catch (IOException e) {
synchronized (mPendingRequests) {
mPendingRequests.remove(sequence);
}
pending.completeExceptionally(e);
}
return pending;