GH-1770 Fixed BindingService unbinding lifecycle
. . . to ensure the bindings are gracefully stopped before unibind is called Resolves #1770
This commit is contained in:
@@ -306,6 +306,8 @@ public class BindingService {
|
||||
List<Binding<?>> bindings = this.consumerBindings.remove(inputName);
|
||||
if (bindings != null && !CollectionUtils.isEmpty(bindings)) {
|
||||
for (Binding<?> binding : bindings) {
|
||||
binding.stop();
|
||||
//then
|
||||
binding.unbind();
|
||||
}
|
||||
}
|
||||
@@ -316,7 +318,10 @@ public class BindingService {
|
||||
|
||||
public void unbindProducers(String outputName) {
|
||||
Binding<?> binding = this.producerBindings.remove(outputName);
|
||||
|
||||
if (binding != null) {
|
||||
binding.stop();
|
||||
//then
|
||||
binding.unbind();
|
||||
}
|
||||
else if (this.log.isWarnEnabled()) {
|
||||
|
||||
Reference in New Issue
Block a user