[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
Save username into DB
OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the
breaking a text file into paragraphs based on strings
I have a text file of email addresses that is all squished together. It looks like this:
abc
php not working written for consumption of slots
1. Here is the function where i will be allowed to consume the slot booked by me.
2. Here i c
Code clarification
Hi
In the following code what could be the "search_print()" and where it could be
comparing tables across databases sql refinement ideas required
Hi all
Via pl/sql I need to ensure that data between tables in different databases match
PHP hyperlinks generator - HELP plz
Hi
I need some help to get this done using php:
1 - I have few hyperlinks say 500
How do I use a global footer..?
If my index.php has a bole bunch of if functions and exit's in them
md5 is it unique
I know this is most likely one of many simple questions that can be found semi easily. But I'm press
To add a field on the screen XK02.
Hi All,
How to add an additional field in the vendor change control screen XK02.
The
Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if t