Skip to content

Commit efdb43f

Browse files
committed
chore: remove redundant error response
1 parent c0a9126 commit efdb43f

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

graphql-java-servlet/src/main/java/graphql/kickstart/servlet/HttpRequestInvokerImpl.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,7 @@ private void invokeAndHandleAsync(
5858
asyncContext.setTimeout(configuration.getAsyncTimeout());
5959
AtomicReference<FutureExecutionResult> futureHolder = new AtomicReference<>();
6060
AsyncTimeoutListener timeoutListener =
61-
event -> {
62-
Optional.ofNullable(futureHolder.get()).ifPresent(FutureExecutionResult::cancel);
63-
writeResultResponse(
64-
invocationInput,
65-
GraphQLQueryResult.create(
66-
new ExecutionResultImpl(new GenericGraphQLError("Timeout"))),
67-
(HttpServletRequest) event.getAsyncContext().getRequest(),
68-
(HttpServletResponse) event.getAsyncContext().getResponse());
69-
listenerHandler.onError(event.getThrowable());
70-
};
61+
event -> Optional.ofNullable(futureHolder.get()).ifPresent(FutureExecutionResult::cancel);
7162
asyncContext.addListener(timeoutListener);
7263
asyncContext.start(
7364
() -> {

0 commit comments

Comments
 (0)