Explicit synchronize on eventLoopGroups object
This commit is contained in:
parent
21186fb0c4
commit
d6e7affa1e
@ -278,7 +278,13 @@ class EndPoint {
|
|||||||
// we want to WAIT until after the event executors have completed shutting down.
|
// we want to WAIT until after the event executors have completed shutting down.
|
||||||
List<Future<?>> shutdownThreadList = new LinkedList<Future<?>>();
|
List<Future<?>> shutdownThreadList = new LinkedList<Future<?>>();
|
||||||
|
|
||||||
for (EventLoopGroup loopGroup : eventLoopGroups) {
|
List<EventLoopGroup> loopGroups;
|
||||||
|
synchronized (eventLoopGroups) {
|
||||||
|
loopGroups = new ArrayList<EventLoopGroup>(eventLoopGroups.size());
|
||||||
|
loopGroups.addAll(eventLoopGroups);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (EventLoopGroup loopGroup : loopGroups) {
|
||||||
shutdownThreadList.add(loopGroup.shutdownGracefully(maxShutdownWaitTimeInMilliSeconds,
|
shutdownThreadList.add(loopGroup.shutdownGracefully(maxShutdownWaitTimeInMilliSeconds,
|
||||||
maxShutdownWaitTimeInMilliSeconds * 4,
|
maxShutdownWaitTimeInMilliSeconds * 4,
|
||||||
TimeUnit.MILLISECONDS));
|
TimeUnit.MILLISECONDS));
|
||||||
|
Loading…
Reference in New Issue
Block a user