[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
User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out b
please help
HTML Code:
Code: <span id="ctl00"><span>
How to validate from 2 possible answers
Hi
I hope somebody can help me with what will probably be really simple, I'm pulling my hair
Replacing a string on click of a button
Hi! Is there a way to replace a string on a click of a text link?
This is what I've come up w
post to self
Trying to get my form to submit to itself. However I am also trying to use an image for my submit bu
Adding meta tags under Zend FW
Hello there, recently has come to my hands the FTP of a website which is running under Zend, I would
PHP and MySQL on intranet?
Is it possible to use both these on an intranet network?
limit string by words??
hello all,
I was wonder if there is a function to limit a string by the number of words inste
unexpected T_SL without a shift left token
Nothing too see here, I'm an idiot and resolved the problem.
script and html conflict in trying to create a header.
I have an error is occurring because of an html webpage with a "php require" at the top of