I have a requirement to close a tcp connection from the server when a client sends a http request, so that the server can send the next http request with a new tcp connection. Could someone please help me how to do that?
I have tried throwing an exception in a middleware but the tcp connection is not closed as I can see the same connection being used in the next http request in Wireshark.