Skip to content

Commit

Permalink
DebugHandler should use isAsyncStarted() instead of isSuspended()
Browse files Browse the repository at this point in the history
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
  • Loading branch information
lachlan-roberts committed Aug 25, 2020
1 parent 2d5da1f commit 8edb768
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -61,7 +61,6 @@ public void handle(String target, Request baseRequest, HttpServletRequest reques
final Thread thread = Thread.currentThread();
final String old_name = thread.getName();

boolean suspend = false;
boolean retry = false;
String name = (String)request.getAttribute("org.eclipse.jetty.thread.name");
if (name == null)
Expand Down Expand Up @@ -103,11 +102,10 @@ public void handle(String target, Request baseRequest, HttpServletRequest reques
finally
{
thread.setName(old_name);
suspend = baseRequest.getHttpChannelState().isSuspended();
if (suspend)
if (baseRequest.getHttpChannelState().isAsyncStarted())
{
request.setAttribute("org.eclipse.jetty.thread.name", name);
print(name, "SUSPEND");
print(name, "ASYNC");
}
else
print(name, "RESPONSE " + base_response.getStatus() + (ex == null ? "" : ("/" + ex)) + " " + base_response.getContentType());
Expand Down

0 comments on commit 8edb768

Please sign in to comment.