Stig
Stig

Reputation: 2086

AddressAlreadyInUseException. Port is not released

in C# using WCF I have more than once experienced that a port is not released when the program has ended. When I use tcpview I see the port is in state “listening” and process is “non-existent”.

How can this happen, when the process is not running any more?

I can't even close it via tcpview. How do i close the connection?

Upvotes: 3

Views: 1542

Answers (1)

El Manolo
El Manolo

Reputation: 11

Just to make sure, do you manually call Close() your client everywhere ? Is there a possibility a Close could slip if the program ended in an unexpected way ?

By the way, I think you can close zombie connections with currport

Upvotes: 1

Related Questions