[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 problem?!?
Hello All! I am very new to the php world but I am working on fixing things that a previous programm
How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor
PHP error on MySQL insert
I'm sure it's the simplest of issues, but I can't recall why this isn't working.
Code: [Selec
simplexml_load_file and rss problem
Hi,
I have a problem parsing an rss feed using simplexml_load_file - this is strange as i hav
How to use Substr
I want to check for the word CATEGORY: inside a string which can be CATEGORY: ITEM
and remove 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
Price in PR
Dear Experts,
Why we have to enter the price in the PR, and why there is no free goods indicato
undefined offset help
Hi All,
I kept getting undefined offset PHP notice for a simple for loop. For eg
$va = arr
Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) {
$attachments = array();
ORA-01655: unable to extend cluster SYS.C_FILE#_BLOCK# by 128
Hi all,
Oracle 10g. Linux.
I'm facing the below error while trying to import a dumpfil