Skip to content

Commit

Permalink
Ignore IOExceptions when closing
Browse files Browse the repository at this point in the history
  • Loading branch information
FroMage committed Apr 9, 2020
1 parent 4e7c031 commit 1b70953
Showing 1 changed file with 13 additions and 1 deletion.
Expand Up @@ -107,7 +107,19 @@ protected void close(boolean flushBeforeClose)
ResteasyAsynchronousResponse asyncResponse = asyncContext.getAsyncResponse();
if (asyncResponse != null)
{
asyncResponse.complete();
try {
asyncResponse.complete();
} catch(RuntimeException x) {
Throwable cause = x;
while(cause.getCause() != null)
cause = cause.getCause();
if(cause instanceof IOException) {
// ignore it, we're closed now
}else {
// is this right?
throw x;
}
}
}
}
clearContextData();
Expand Down

0 comments on commit 1b70953

Please sign in to comment.