[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
need Array help
This is what I have to do.
$teamname[1] = "Red Sox"
$teamname[2] = "Gian
Tournament Brackets (Double Elimination)?
Is making a double elimination tournament style bracket system capable of being done in php?
square instead of number
Hello
I do not know why but this code seems to work fine only in my xampp local insallation but n
Having a problem get the selected item from a drop down menu
I have been looking at this for days now.
I have a drop down menu that get it's values from a
creating a 1 to 100 in a table
hi guys I am a newb in php need some help.
I have a table with 1 column and 100 rows and in
Return X values where an ID number doesnt matter
Well as for subject heading, thats the best i could think of.
Currently im having a problem w
login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php
Auto fill in input value based on User_ID
Hello,
I'm looking form some input on the following problem.
User loads page ->
bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error
Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne