Merge "Do not leak Future when CompanionTransportManager.sendMessage() thows"
This commit is contained in:
committed by
Android (Google) Code Review
commit
37af9d8cc4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user