server don't send its abilities when client don't send its abilities (#11661)

This commit is contained in:
chenyiqin 2024-01-17 15:19:36 +08:00 committed by GitHub
parent a7d1c35f85
commit 1943825e4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -138,10 +138,15 @@ public class GrpcBiStreamRequestAcceptor extends BiRequestStreamGrpc.BiRequestSt
}
} else {
try {
// finish register, tell client has set up successfully
// async response without client ack
connection.sendRequestNoAck(new SetupAckRequest(NacosAbilityManagerHolder.getInstance()
.getCurrentNodeAbilities(AbilityMode.SERVER)));
// server sends abilities only when:
// 1. client sends setUpRequest with its abilities table
// 2. client sends setUpRequest with empty table
if (setUpRequest.getAbilityTable() != null) {
// finish register, tell client has set up successfully
// async response without client ack
connection.sendRequestNoAck(new SetupAckRequest(NacosAbilityManagerHolder.getInstance()
.getCurrentNodeAbilities(AbilityMode.SERVER)));
}
} catch (Exception e) {
// nothing to do