[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
how to validate date using javascript
I need to validate date in textbox using javascript..
The date is must be not greater than TODAY
Upload simple problem
Really confused!! I run once and it worked, but when i tried today...it didn't work
Which par
multiple recipients + dbuser mail recall
Hello,
I am building a php login script.
When the user registers the script will send
Recording popularity by day, week.. all time?
Hey everyone, I'm creating a site designed around users uploading music. How can I implement a syste
does anyone know a php script to send mail using gmails/googles free smtp server
cause i heard u can do that but i dont know how
include
Hi I have this way of licensing my PHP application, and I want to know if you guys can answer some q
How to get variable value on next page
Hello friends
i am working on payentry page ..there i have this code.........
send message to the java application
Oracle 10g with Windows platform.
I have a java application that periodically pings the d
Help If user voted, block them
On my Prayer request site, i let users Click a button to Pray for somone that has posted a pray, i g
Is there a way to override built in php functions without APD?
I am trying to use the
rename_function()
override_function()
options that are built into