Skip to content

Commit

Permalink
Merge pull request #158 from dwnusbaum/fix-doSubmit
Browse files Browse the repository at this point in the history
Avoid "IOException: cannot find current thread" when submitting an input step that ends a `CpsThread`
  • Loading branch information
dwnusbaum authored Feb 7, 2024
2 parents 4b70bff + 72d94f3 commit b07d21d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,15 @@ public String getDisplayName() {
*/
@RequirePOST
public HttpResponse doSubmit(StaplerRequest request) throws IOException, ServletException, InterruptedException {
Run<?, ?> run = getRun();
if (request.getParameter("proceed")!=null) {
doProceed(request);
} else {
doAbort();
}

// go back to the Run console page
return HttpResponses.redirectTo(ConsoleUrlProvider.getRedirectUrl(getRun()));
return HttpResponses.redirectTo(ConsoleUrlProvider.getRedirectUrl(run));
}

/**
Expand Down

0 comments on commit b07d21d

Please sign in to comment.