Pil0tXia opened a new pull request, #4336:
URL: https://github.com/apache/eventmesh/pull/4336

   <!--
   ### Contribution Checklist
   
     - Name the pull request in the form "[ISSUE #XXXX] Title of the pull 
request", 
       where *XXXX* should be replaced by the actual issue number.
       Skip *[ISSUE #XXXX]* if there is no associated github issue for this 
pull request.
   
     - Fill out the template below to describe the changes contributed by the 
pull request. 
       That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue. 
       Please do not mix up code from multiple issues.
     
     - Each commit in the pull request should have a meaningful commit message.
   
     - Once all items of the checklist are addressed, remove the above text and 
this checklist, 
       leaving only the filled out template below.
   
   (The sections below can be removed for hotfixes of typos)
   -->
   
   <!--
   (If this PR fixes a GitHub issue, please add `Fixes #<XXX>` or `Closes 
#<XXX>`.)
   -->
   
   Fixes #4335.
   
   ### Motivation
   
   Most of the services that use `HandlerService` are affected by this bug. 
When sending webhook payloads using Postman and spoofing the hash value, the 
CloudEvent is sent successfully. However, Postman remains in a waiting state 
even after receiving a 200 or 500 status code. 
   
   Webhook Delivery Error:
   
   
![image](https://github.com/apache/eventmesh/assets/41445332/dcf095ed-b0d3-4ffd-ac8c-81d9f8bc0067)
   
   
![image](https://github.com/apache/eventmesh/assets/41445332/00be5240-ea5a-4e8b-aeb4-9bce1e314ed4)
   
   **In the screenshots of the webhook documentation, the tasks are also 
failing.** I will submit a corresponding PR to correct it later.
   
   
![image](https://github.com/apache/eventmesh/assets/41445332/642e0d1b-38da-4879-af0f-7a0547af0c01)
   
   ### Modifications
   
   I choose to asynchronously close the connection in the `sendResponse()` 
method rather than synchronously closing it in `postHandler()` or `run()`. This 
is to avoid premature closure of the connection while asynchronous tasks are 
still in progress. As shown, this modification may occasionally cause GitHub to 
report an "EOF" error.
   
   
![image](https://github.com/apache/eventmesh/assets/41445332/0e885a25-68a3-4978-ab64-e25c904e8969)
   
   After promptly closing the connection, Postman no longer waits, and the 
GitHub task succeeds.
   
   
![image](https://github.com/apache/eventmesh/assets/41445332/4f6c12d6-d7c8-46c2-88ec-c3af51feee43)
   
   
![image](https://github.com/apache/eventmesh/assets/41445332/b450112b-f6df-4fe6-9e13-73f95f5256c6)
   
   ### Documentation
   
   - Does this pull request introduce a new feature? (yes / no)
   - If yes, how is the feature documented? (not applicable / docs / JavaDocs / 
not documented)
   - If a feature is not applicable for documentation, explain why?
   - If a feature is not documented yet in this PR, please create a followup 
issue for adding the documentation
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to