File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
sources/net.sf.j2s.ajax/ajaxcore/net/sf/j2s/ajax Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,7 @@ private boolean checkAbort() {
400400 private void request () {
401401 try {
402402 connection = (HttpURLConnection ) new URL (url ).openConnection ();
403+ connection .setReadTimeout (30000 ); // 30 seconds
403404 connection .setDoInput (true );
404405 connection .setRequestMethod (method );
405406 connection .setRequestProperty ("User-Agent" ,
@@ -437,7 +438,7 @@ private void request() {
437438 is = connection .getInputStream ();
438439 } catch (IOException e ) {
439440 if (checkAbort ()) return ; // exception caused by abort action
440- e .printStackTrace ();
441+ // e.printStackTrace();
441442 readyState = 4 ;
442443 if (onreadystatechange != null ) {
443444 onreadystatechange .onLoaded ();
@@ -545,7 +546,7 @@ private void request() {
545546 */
546547 } catch (IOException e ) {
547548 if (checkAbort ()) return ; // exception caused by abort action
548- e .printStackTrace ();
549+ // e.printStackTrace();
549550 readyState = 4 ;
550551 if (onreadystatechange != null ) {
551552 onreadystatechange .onLoaded ();
You can’t perform that action at this time.
0 commit comments