question

StanKasper-4297 avatar image
0 Votes"
StanKasper-4297 asked ·

Windows Network Connections Open Even after owning process ends

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-10-network
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CandyLuo-MSFT avatar image
0 Votes"
CandyLuo-MSFT answered ·

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.




·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

StanKasper-4297 avatar image
0 Votes"
StanKasper-4297 answered ·

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

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You are welcome! Have a nice day. :)

0 Votes 0 ·