mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Extend logging in JsonRpcReader
This commit is contained in:
parent
e495afcff5
commit
e7a4bc5ef1
1 changed files with 5 additions and 4 deletions
|
@ -41,13 +41,14 @@ public class JsonRpcReader {
|
||||||
JsonRpcMessage message = readMessage();
|
JsonRpcMessage message = readMessage();
|
||||||
if (message == null) break;
|
if (message == null) break;
|
||||||
|
|
||||||
if (message instanceof JsonRpcRequest) {
|
if (message instanceof final JsonRpcRequest jsonRpcRequest) {
|
||||||
final var response = handleRequest(requestHandler, (JsonRpcRequest) message);
|
logger.debug("Received json rpc request, method: " + jsonRpcRequest.method);
|
||||||
|
final var response = handleRequest(requestHandler, jsonRpcRequest);
|
||||||
if (response != null) {
|
if (response != null) {
|
||||||
jsonRpcSender.sendResponse(response);
|
jsonRpcSender.sendResponse(response);
|
||||||
}
|
}
|
||||||
} else if (message instanceof JsonRpcResponse) {
|
} else if (message instanceof JsonRpcResponse jsonRpcResponse) {
|
||||||
responseHandler.accept((JsonRpcResponse) message);
|
responseHandler.accept(jsonRpcResponse);
|
||||||
} else {
|
} else {
|
||||||
final var responseList = ((JsonRpcBulkMessage) message).getMessages().stream().map(jsonNode -> {
|
final var responseList = ((JsonRpcBulkMessage) message).getMessages().stream().map(jsonNode -> {
|
||||||
final JsonRpcRequest request;
|
final JsonRpcRequest request;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue