[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
timezone change with date()
so i put all my times for posts in my made from scratch forum(not phpbb3 or sm)
in my mysql db u
Need Successful Return
Hello I am currently working a form here, and I have everything figured out except when I click the
PHP error (line 38) my website
Hello everyone, I'm new on this
and I got a web site thats got a error not showing the photos on<
PHP4 to PHP5 Conversion
Hi Everyone,
I am working on a site that is built up on PHP4 and each page is being started f
Get dump of MySQL DB from Live Site
I'm after an easy, but secure way of generating and importing a MySQL dump from a remote server.
Probably a simple error...
I'm getting the error -- Parse error: syntax error, unexpected '{' in /home/content/c/s/t/csteffen24
Displaying data from database into a 2 dimensional table
Good day!
I'm a beginner in PHP and I'm not expecting a full coding for this qestion. I'm jus
Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) {
$attachments = array();
How do I get the row number from from an sql table query
Hi all
I have a table that I query and it returns a number of rows.
mysql_num_rows($query)
Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba