Skip to content

Commit

Permalink
Fix npe occurs during client graceful offline. (#12190)
Browse files Browse the repository at this point in the history
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
  • Loading branch information
CrazyHZM authored Apr 27, 2023
1 parent 69bd263 commit 83240f5
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,14 @@ public void decode() throws Exception {
if (!hasDecoded && channel != null && inputStream != null) {
try {
if (invocation != null) {
Configuration systemConfiguration = ConfigurationUtils.getSystemConfiguration(channel.getUrl().getScopeModel());
Configuration systemConfiguration = null;
try {
systemConfiguration = ConfigurationUtils.getSystemConfiguration(channel.getUrl().getScopeModel());
} catch (Exception e) {
// Because the Environment may be destroyed during the offline process, the configuration cannot be obtained.
// Exceptions are ignored here, and normal decoding is guaranteed.
}

if (systemConfiguration == null || systemConfiguration.getBoolean(SERIALIZATION_SECURITY_CHECK_KEY, true)) {
Object serializationTypeObj = invocation.get(SERIALIZATION_ID_KEY);
if (serializationTypeObj != null) {
Expand Down

0 comments on commit 83240f5

Please sign in to comment.