Before the end method of the http.ServerResponse object is called, if the connection is interrupted, the close event of the http.ServerResponse object will be triggered.
The above code is like this:
When the client makes a request, send "Hello" to the client after 10 seconds. At the same time, listen for the close event.
As long as the server is shut down within 10 seconds, "Connection interrupted" will appear on the server because the res.end() method will not be executed within 10 seconds.