Address review comments
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
parent
914a14a92a
commit
264a0c9041
2 changed files with 13 additions and 10 deletions
|
|
@ -369,13 +369,12 @@ public class McpAsyncClient {
|
|||
|
||||
/**
|
||||
* Sends a ping request to the server.
|
||||
* @return A Mono that completes when the server responds to the ping
|
||||
* @return A Mono that completes with the server's ping response
|
||||
*/
|
||||
public Mono<Void> ping() {
|
||||
public Mono<Object> ping() {
|
||||
return this.withInitializationCheck("pinging the server", initializedResult -> this.mcpSession
|
||||
.sendRequest(McpSchema.METHOD_PING, null, new TypeReference<Object>() {
|
||||
})
|
||||
.then());
|
||||
}));
|
||||
}
|
||||
|
||||
// --------------------------
|
||||
|
|
|
|||
|
|
@ -179,10 +179,11 @@ public class McpSyncClient implements AutoCloseable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Send a synchronous ping request to the server.
|
||||
* Send a synchronous ping request.
|
||||
* @return
|
||||
*/
|
||||
public void ping() {
|
||||
this.delegate.ping().block();
|
||||
public Object ping() {
|
||||
return this.delegate.ping().block();
|
||||
}
|
||||
|
||||
// --------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue