This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes some sockets are not being closed Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "some sockets are not being closed " Watch "some sockets are not being closed " New topic
Author

some sockets are not being closed

Doua Beri
Ranch Hand

Joined: Sep 24, 2009
Posts: 60
hi everyone. So I have the following code:



So it connects through a SOCKS proxy and save the content of an website to a file. Works great but with some proxies the application blocks. I tried everything.
If I choose to terminate the thread it simply takes areound 5-6 minutes sometimes even 15 min+ for the thread to be terminated.

I think it's an OS problem. no so sure. I use Windows Vista. I run the app on another windows vista and the same result. I switch to win XP and still the same result. I never tested on linux because my app need to run on windows systems (XP or higher).

Did you faced similar problems where the socked will just not want to close ? Also if you know what I should do I will much appreciate.

Thank you
Mark Uppeteer
Ranch Hand

Joined: Mar 02, 2004
Posts: 159

what is the exact line of code that blocks ? did you run through it with the debugger ?


I know where my towel is. (SCJP 5, OCPJWCD)
[Free Quiz Tips for a fun night with friends or family] Flash games
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: some sockets are not being closed
 
Similar Threads
Socket communiction works on XP but not on Vista
Thread with synchronized run() method and sleep()
Global Hotkeys, other than JIntellitype
Windows 7 seems to be worth it
Find windows special folders