Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
He-Pin committed Jan 12, 2025
1 parent c6821b6 commit 7b109dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cask/src/cask/internal/ThreadBlockingHandler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ final class ThreadBlockingHandler(executor: Executor, handler: HttpHandler) exte
require(executor ne null, "Executor should not be null")

def handleRequest(exchange: HttpServerExchange): Unit = {
if (exchange.isInIoThread) {
exchange.dispatch(this)
return
}
exchange.startBlocking()
exchange.dispatch(executor, handler)
}
Expand Down

0 comments on commit 7b109dd

Please sign in to comment.