[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
Typing math
I've added support for typesetting math using LaTeX on the forums.
Example:
Code: [Select]
creating a 1 to 100 in a table
hi guys I am a newb in php need some help.
I have a table with 1 column and 100 rows and in
Is there a function ... auto send IP
Is there some function that can be sent to a ddns service that returns the ip address of a ddns forw
Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the
help with multi-update
Now sure how to ask this really....
10g database if that matters.
I have a customer
Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system
Say I go to h
Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in
help me, how to find text on an external html site using PHP
Would anyone know how to search an external html file for a work or phrase ?
I was thinking s
switch not getting value
what am i doing wrong?
i want to populate the country list according to the category
i want to
PHP template help
Ok, I don't know if anyone can help me but I am using PHP templates to make a site. I am a newbie an