Close cache safely in DefaultReactivePulsarSenderFactory close() (#519)

Fixes https://github.com/spring-projects/spring-boot/issues/38161
This commit is contained in:
Chris Bono
2023-12-13 21:45:06 -06:00
committed by GitHub
parent 66a75d1e26
commit d296e6862a

View File

@@ -172,8 +172,9 @@ public final class DefaultReactivePulsarSenderFactory<T>
@Override
public void doStop() {
try {
this.reactiveMessageSenderCache.close();
if (this.reactiveMessageSenderCache != null) {
this.reactiveMessageSenderCache.close();
}
}
catch (Exception e) {
throw new RuntimeException(e);