[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
Error when call dll from oracle
Hi all, please help me!
I have dll write C language, I want call it from oracle procedur
using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto
Procedure with variable number of columns
Hi, I have a procedure that looks like this:
PROCEDURE PROC(p_cursor OUT sys_refcurso
Socket Server Response Headers
Earlier I had a post about my Socket Server, I wasn't able to get it to connect, now I can
I
DELETE rows based on content
I have a link in my rows
$bit="http://bit.ly/abcd";
$query = mysql_query("D
Script not running properly
Hello Everyone
This is a basic script for posting to a database. I'm not sure why it doesn't work
How to clone an SAP ECC using bacup tape on z/os?
We want to clone our production to a different SID using backup tape.
How to login with SAPCPIC userid
I have changed the Password for SAPCPIC in Development Server for 000,001 and 100 client.
But w
Help With Showing Users On the Index Page
Ive got this code which works just how i want it to.
Code: <?
$timenow=time();
Operating System
How in PHP or other language can I detect Operating system, ie Windows XP Home, Windows 7 Ultimate,