[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
newbie question about multiple queries
hi everyone,
I'm sorry to ask such a basic question, but I'm young and trying to learn php on my
PHP - HTTP Digest Authentication - Understanding Code Help
Hi Everyone,
This is my first time on your website and please excuse if I am asking silly que
Multi image upload
I have a gallery to build and want to build a dynamic upload form to allow for $var number of fields
Help with php code
Hello, can anyone tell me why this php word trap fails to work,
and the trigger words get blow r
Cloud Computing?
Hello,
I was wondering if anyone could help explain this term to me. I'm starting to hear it
socket communication between c++/java and sending image
hi,
i have a class in c++ called win32_sockserver which creates socket to java. i am trying
Weird MySQL error, why am I recieving this?
PHP Code:
<?php require "global_settings.php"; ?>
<titl
Standard DES encryption script?
Can anybody point me to a tutorial or a short script that shows how to encrypt some text with salt i
How to kill asynchronous postback / current postback?
Hi,here is my problem:I have a web site with many pages of which some may take time to process resul
Allegro crashes when running load_bitmap. Why?
I can not get Allegro to load any BMP images. Here is a section of test code. The picture is in the