[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
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
quotes changing
hi all
in my content
opening quotes " changes to “
close qu
Mail Script Problems
I have created a PHP mail script. I am having a problem though. In $body i am trying to put two va
max function question
Hi All
Ihave a table that holds shipment numbers and dates like this
select * from
array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.
// foreach
Displaying data from MySql a different way
Hi all,
I'm pretty new to php and MySql and have hit a problem.
I am able to display data
How to search for several parameters from objects in a database?
I have a database with lots of information about objects.
Now I would like to search for 4 or 5 p
javascript in php code causes page to display white
Hi All,
Odd one this, I've got the following code (below) which is a simple log in form. The
At max how many columns is advisable to create in a table/view
Hi All,
I have two transaction table from which i want to create a simple view or material
RSS feed - FeedList for WordPress
Hi,
I'm trying to alter the FeedList plugin for WordPress so that I can click on the title of