Hi everyone, I'm a bit new in Java.

I have the following code which will read a php responded XML file.
It's running under a timer in 10 seconds (for checking a message from server)
Everything is OK when the Internet line smooth, When the internet line disconnected, some this it's return error but still OK because it's going back to normal when the Internet line resume.

But sometime when the Internet line not so smooth, The request will just hanging over there, including the timer also not moving untill you have to use "alt-Ctrl Delete" to end the entire application.

Anybody know why? and how can i solve this problem.

##########################################
public boolean send(String file,String action)
{ address += file + "?act=" + action + param;
SAXParserFactory factory = SAXParserFactory.newInstance();
XMLReader read = null;
try{
if(debug) System.out.println(address);
SAXParser saxParser = factory.newSAXParser();
read = saxParser.getXMLReader();
saxParser.parse(address,DH);

}catch(javax.xml.parsers.ParserConfigurationExcept ion e){
e.printStackTrace();
DH.msg = e.getMessage();
// saxParser.
}catch(java.io.IOException e){
e.printStackTrace();
DH.msg = e.getMessage();
}catch(org.xml.sax.SAXException e){
e.printStackTrace();
DH.msg = e.getMessage();
}
return DH.status;
}