[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?
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
Unable to display contents in Second Drop Down Box
Hi All,
What I am trying to do is 2 dependent drop down boxes and when user selects su
Reditecting pages based on logic
Newbie here, apologies in advance!
I am trying to use the header function to forward one of a
calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same
Filtering an Array Based on Value
I have a very simple script set up that pulls data from a database and is output using this code:
Page Reload
I am having issues getting a page to reload after I submit data to a database. This form should inp
problem with array - multilingual page
this is my test page :
Code: <?php
if(isset($_GET['lang'])) {
if($_GET['la
Php Mysql Page Loading Notice
Hi all,
I was wondering if there is a way (Sure there is) of showing a message or an image wh
Is STL important?
I'm just starting programming and I've made it until the Standart Template Library. But the chapter
phpmailer class & pop.gmail.com?
Code: <?php
$mail->IsSMTP();
$mail->Host = "pop.gmail.com";
Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sit