I'm trying to ensure that a Windows service program (running on top of .NET) is properly releasing its network connections.
When running the service locally I know that it will create a lot of HTTP connections to localhost on port 57300. I'm using netstat
to monitor whether they are released properly.
I was suprised to see that many connections to this port are owned by the "System Idle process" (PID=0).
Here we can see that only three of those connections are owned by the service program (PID=5012). All the others are owned by PID 0.
My main questions are: Why is this happening? and Do I need to care?
But I'd also like to know:
Does this mean that the service program did release the connection properly, or not?
Will such connections be reused if needed?
Do such a connection "reserve a slot" in the .NET ServicePointManager?