diff --git a/src/main/java/com/aws/greengrass/logmanager/util/SdkClientWrapper.java b/src/main/java/com/aws/greengrass/logmanager/util/SdkClientWrapper.java index 8d55f4b9..014bc5b2 100644 --- a/src/main/java/com/aws/greengrass/logmanager/util/SdkClientWrapper.java +++ b/src/main/java/com/aws/greengrass/logmanager/util/SdkClientWrapper.java @@ -74,7 +74,8 @@ private void refreshClient() { private boolean shouldRefreshClient(SdkClientException e) { Throwable cause = e; while (cause != null) { - if (cause instanceof SocketException && "Connection reset".equals(cause.getMessage())) { + if (cause.getMessage() != null && cause instanceof SocketException + && "connection reset".contains(cause.getMessage().toLowerCase())) { return true; } if (cause instanceof NoHttpResponseException) {