Fixes #3929 - Deadlock between new HTTP2Connection() and Server.stop().
Previously beans were started if they were not running, which included them being in a STOPPING state. Now beans are only started if they are in STOPPED state. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
ab015f2653
commit
6c1b5982a5
|
@ -106,18 +106,20 @@ public class ContainerLifeCycle extends AbstractLifeCycle implements Container,
|
||||||
switch (b._managed)
|
switch (b._managed)
|
||||||
{
|
{
|
||||||
case MANAGED:
|
case MANAGED:
|
||||||
if (!l.isRunning())
|
if (l.isStopped())
|
||||||
start(l);
|
start(l);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AUTO:
|
case AUTO:
|
||||||
if (l.isRunning())
|
if (l.isStopped())
|
||||||
unmanage(b);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
manage(b);
|
manage(b);
|
||||||
start(l);
|
start(l);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unmanage(b);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -142,7 +144,7 @@ public class ContainerLifeCycle extends AbstractLifeCycle implements Container,
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
l.stop();
|
stop(l);
|
||||||
}
|
}
|
||||||
catch (Throwable cause2)
|
catch (Throwable cause2)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue