Merge branch '2.1.x'

Closes gh-17120
This commit is contained in:
Andy Wilkinson
2019-06-12 12:41:09 +01:00
2 changed files with 10 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.TimeUnit;
import io.undertow.Handlers;
import io.undertow.Undertow;
@@ -156,10 +157,14 @@ public class UndertowReactiveWebServerFactory extends AbstractReactiveWebServerF
try {
accessLogReceiver.close();
worker.shutdown();
worker.awaitTermination(30, TimeUnit.SECONDS);
}
catch (IOException ex) {
throw new IllegalStateException(ex);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
}
};
}
catch (IOException ex) {

View File

@@ -28,6 +28,7 @@ import java.util.Collections;
import java.util.EventListener;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import javax.servlet.ServletContainerInitializer;
import javax.servlet.ServletContext;
@@ -652,10 +653,14 @@ public class UndertowServletWebServerFactory extends AbstractServletWebServerFac
try {
this.accessLogReceiver.close();
this.worker.shutdown();
this.worker.awaitTermination(30, TimeUnit.SECONDS);
}
catch (IOException ex) {
throw new IllegalStateException(ex);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
}
}
}