Fix batch response in case of empty responses list

This adapts the implementation to the JSON-RPC specification.
This commit is contained in:
AsamK 2023-09-23 11:52:37 +02:00
parent b2a32666e9
commit fd851ba6cb

View file

@ -95,7 +95,9 @@ public class JsonRpcReader {
return handleRequest(requestHandler, request);
}).filter(Objects::nonNull).toList();
jsonRpcSender.sendBatchResponses(responseList);
if (responseList.size() > 0) {
jsonRpcSender.sendBatchResponses(responseList);
}
}
}