Skip to content

Commit b05e917

Browse files
committed
Merge branch '4.3.x-stable'
2 parents f2ed1dc + 52580e1 commit b05e917

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)