Skip to content

Commit 52580e1

Browse files
committed
Merge branch '4.2.x-stable' into 4.3.x-stable
2 parents 3434f59 + ff8ef23 commit 52580e1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/com/rabbitmq/client/RpcClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,10 @@ public void handleDelivery(String consumerTag,
190190
throws IOException {
191191
synchronized (_continuationMap) {
192192
String replyId = properties.getCorrelationId();
193-
BlockingCell<Object> blocker = _continuationMap.get(replyId);
194-
_continuationMap.remove(replyId);
193+
BlockingCell<Object> blocker =_continuationMap.remove(replyId);
194+
if (blocker == null) {
195+
throw new IllegalStateException("No outstanding request for correlation ID " + replyId);
196+
}
195197
blocker.set(new Response(consumerTag, envelope, properties, body));
196198
}
197199
}

0 commit comments

Comments
 (0)