INT-4486: Properly implement stop(Runnable)
JIRA: https://jira.spring.io/browse/INT-4486 The `SmartLifecycle.stop(Runnable callback)` must always call the `callback` in the end independently of the internal state * Revise all the `SmartLifecycle` implementations for the proper `callback` handling **Cherry-pick to 5.0.x and 4.3.x**
This commit is contained in:
committed by
Gary Russell
parent
125cc861d4
commit
1ce656e4fe
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,7 +32,10 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Factory bean to create syslog inbound adapters (UDP or TCP).
|
||||
*
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 3.0
|
||||
*
|
||||
*/
|
||||
@@ -163,6 +166,9 @@ public class SyslogReceivingChannelAdapterFactoryBean extends AbstractFactoryBea
|
||||
if (this.adapter != null) {
|
||||
this.adapter.stop(callback);
|
||||
}
|
||||
else {
|
||||
callback.run();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user