[RESOLVED] Socket/Port remains open after app crashes
Posted on
16th Feb 2014 07:03 pm by
admin
I'm having this problem with a networked app in vb.net.
If the program exits normally the port closes fine, however, if it crashes sometimes it remains open and I am unable to close it. The next time I run the program it is unable to open the port because it is already in use. Here's the exception:
10048: Only one usage of each socket address (protocol/network address/port) is normally permittedAny ideas on how I can reclaim this port, or how I can close it?
Did you know?Explore Trending and Topic pages for more stories like this.
I tried using the reuse address socket option
Code: SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1) but that just opens the port again and does not close the old one. see this netstat output:
TCP PCISERVER:14000 PCISERVER.cpwpci.cpwgroup.net:0 LISTENING 4320
[System]
TCP PCISERVER:14000 PCISERVER.cpwpci.cpwgroup.net:0 LISTENING 5808
[System]
TCP PCISERVER:14001 PCISERVER.cpwpci.cpwgroup.net:0 LISTENING 5808
[System]
TCP PCISERVER:14001 PCISERVER.cpwpci.cpwgroup.net:0 LISTENING 4320
[System]
As you can see once the program exits the ports remain opened by the System process.
I don't know of a way to stop them from listening besides a restart.
No comments posted yet
Your Answer:
Login to answer
87
27
Other forums
Got A Free Server :(
So I was given a free server
http://shopping.yahoo.com/p:Compaq%20ProLiant%201500%20Server:1
button help
i originally had this but realised it is much easier to have a button.
Code: <?php
Typedef struct vs just struct
Anyone know the rationale for using typedef for structs when a struct is itself a typedef? I have s
PHP Redirecting
Hello everyone. Is there a way to redirect people to pages within a statement in PHP? Since there is
mysql_query returning boolean instead of mysql ressource
Hi,
I seem to have a weird issue with the php command mysql_query. I pass 2 arguments the que
grouping within a foreach?
hello all,
I currently have a list of products spit out from my db via a foreach loop. Right
Dynamic memory problem
Hey,
At the beginning of my code, I have this line:
Shape* gShape = 0;
Multiple WHILE loops help
Hi there. I'm writing an application that is pulling and displaying results for real estate listing
PHP Display Telephone Number On Referrer
I have used the php below to show a different telephone number in the header of the site depending u
article site help remaining text
Hi all hope you will be fine
I am creating a article site in this site i want to put some text on