Skip to content

Commit 46cf365

Browse files
committed
Prevent blocking nio threads
1 parent a5b9ce0 commit 46cf365

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

common/src/main/java/org/openshift/ping/common/server/UndertowServer.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ private Handler(Server server) {
7575
}
7676

7777
public void handleRequest(HttpServerExchange exchange) throws Exception {
78+
if(exchange.isInIoThread()) {
79+
exchange.dispatch(this);
80+
return;
81+
}
82+
7883
exchange.startBlocking();
7984
String clusterName = exchange.getRequestHeaders().getFirst(CLUSTER_NAME);
8085
Channel channel = server.getChannel(clusterName);

0 commit comments

Comments
 (0)