2

While NodeJs architecture does very well to process server requests in a non-blocking way, it is sometimes required to stop/abort a request being processed at the server side.

How can I get my NodeJs server to abort a request even when it's not blocking the server?

Jason Sturges
  • 15,855
  • 14
  • 59
  • 80
Rahul Bhatnagar
  • 627
  • 5
  • 6
  • Is this a outgoing or incoming request? – Dan D. Jun 24 '12 at 17:10
  • Hi Dan! The request is coming into NodeJs from a C# client. – Rahul Bhatnagar Jun 24 '12 at 20:05
  • 1
    Can you just respond to a client with corresponding HTTP status code (500?) ? – Andrey Sidorov Jun 25 '12 at 03:16
  • Hi Andrew! Before the NodeJs server responds with 500 status code, it ideally has to stop the processing of the request first [say fetching of a file on the server]. If the server sends back response 500 before it has actually stopped the fetching, it would still result into server resources being bogged down. Hope that explains. – Rahul Bhatnagar Jun 25 '12 at 22:34

0 Answers0