mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-01 15:47:01 +08:00
Avoid NPE for handling client settings null in notifyClientTermination. (#9308)
This commit is contained in:
@@ -138,6 +138,12 @@ public class ClientActivity extends AbstractMessingActivity {
|
||||
String clientId = ctx.getClientID();
|
||||
LanguageCode languageCode = LanguageCode.valueOf(ctx.getLanguage());
|
||||
Settings clientSettings = grpcClientSettingsManager.removeAndGetClientSettings(ctx);
|
||||
if (clientSettings == null) {
|
||||
future.complete(NotifyClientTerminationResponse.newBuilder()
|
||||
.setStatus(ResponseBuilder.getInstance().buildStatus(Code.UNRECOGNIZED_CLIENT_TYPE, "cannot find client settings for this client"))
|
||||
.build());
|
||||
return future;
|
||||
}
|
||||
|
||||
switch (clientSettings.getClientType()) {
|
||||
case PRODUCER:
|
||||
|
||||
Reference in New Issue
Block a user