Windows Network Connections Open Even after owning process ends

Stan Kasper 1,476 Reputation points
2021-03-21T16:12:39.877+00:00

I run a browser and go to a website. The website opens up a number of connections. I can see the connections using 'netstat -ano' and the identity of the process PID. I close the web browser. But the connections stay open and are then associated with PID 0 - system idle. I log off and then log back on. I do a 'netstat -ano' and I still see the network connections and there associated process PID 0. After something like a minute or more the connections eventually go away. Is there a reason network connections do not close when the process terminates? Is there a configuration option to close the connections completely when the owning process terminates?

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2021-03-22T07:37:51.337+00:00

    Hi ,

    After a TCP connection closes, it goes into the TIME_WAIT state for a fixed period. It is a deliberate design feature of TCP.

    You can reduce the value of TcpTimedWaitDelay to allows TCP to release closed connections faster.

    For your reference:

    TIME_WAIT and its design implications for protocols and scalable client server systems

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    TcpTimedWaitDelay

    Best Regards,

    Candy

    --------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Stan Kasper 1,476 Reputation points
    2021-03-22T16:22:36.133+00:00

    Thank you. Wow. 4 minute wait time default before releasing closed connections. Will check the RFC to see what the logic is behind that...


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.