Skip to content

Commit

Permalink
Merge pull request #25 from yrashk/github-webhook-no-timeout
Browse files Browse the repository at this point in the history
Problem: GitHub PR hook will wait until emitters are done
  • Loading branch information
yrashk committed Jul 23, 2016
2 parents 59e44db + 182a913 commit 984c49d
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -50,6 +50,8 @@ public class GithubPRWebhookServlet extends HttpServlet implements Servlet {
Map<String, Object> payload = new ObjectMapper().readValue(req.getReader(),
new TypeReference<Map<String, Object>>() {});

asyncContext.complete();

String action = (String) payload.get("action");
Integer number = (Integer) payload.get("number");
@SuppressWarnings("unchecked")
Expand All @@ -65,8 +67,6 @@ public class GithubPRWebhookServlet extends HttpServlet implements Servlet {
.forEach(emitter -> emitter.onPullRequestEvent(number));

}

asyncContext.complete();
}
});
}
Expand Down

0 comments on commit 984c49d

Please sign in to comment.