[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?
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
How do i do multi uploads?.
Hey i would like to do this : http://hosting.mrkrabz.net/
I've got the base down you can uplo
pass form variables straight to email, no database required?
hello all,
im working on this form...
http://www.adobedayevents.com/project_request/pr
PHP page loading in Firefox but not in IE
hello,
i am currently doing a project in PHP and i have a problem. If I view the project in M
PHP header help!
Hi all I am trying to get this php page to refresh every 5 seconds on my phone which is an aastra 48
PHP4 to PHP5 Conversion
Hi Everyone,
I am working on a site that is built up on PHP4 and each page is being started f
images aren't rendering
I'm trying to call a JPG file from within PHP (in an effort to hide the actual JPG folder). The imag
how do i make a string??
hey guys,
can someone please tell me how to put data from the glob function into a string
how can i make a .gif images for my site
Dear Friends ,
Pls solve my problem , I am starting making new site but i dont know how can i
single values into sql field
i have a form which i want the user to able to select multiple answers. But i want the answers to be
Newb advice
Hi all,
I'm a flash front end designer and I've taken on a project that needs some back end p