Close cache safely in DefaultReactivePulsarSenderFactory close() (#519)
Fixes https://github.com/spring-projects/spring-boot/issues/38161
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user