[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
Problem with coding MySQL query
I'm having heaps of trouble getting one of my PHP/MySQL queries to work for some reason (and the fun
returning data from an ssh2_exec()
here's what i got.
$conn = ssh2_connect($this->_host);
ssh2_auth_password($c
php title problem
Hi,
I am having a problem managing my page title with PHP.
Currently I have my <
Matchcode in ALV change header column
Hello everyone,
I am working in an SAP system that is currently in upgrade and conversion
Storing user data help?
Hey Guys,
I'm not use if this question is to broad but I can always give you more informatio
Print out contents of to Excel
I have got this script that gathers all the data that I need but I need it to send it to excel inste
Trouble checking SESSION cookie
I am trying to use $_SESSION cookies to verify admin privileges .
I don't understand why this is
PHP form help required
Hi all! Apologies in advance for having to message the forum for help. I know you must get a lot of
Checking if multidimensional array is empty?
I have a for with multiple test input fields. Specifically the user submits multiple names and ages
ImageCreate()
When I create an image and add text to it I want my text to be replaced with a PNG image, because th