View Single Post
  #1286  
Old 22.03.2020, 00:57
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,614
Default

Quote:
Originally Posted by Heinz View Post
Is there any timeout possible for the getPage request?
Like if the page is not loaded after 10sec it should skip the request.

Code:
browser.setConnectTimeout(10000);
browser.setReadTimeout(10000);
Dont seem to help..

Code:
var browser = getBrowser();
try {
	browser.getPage("http://www.google.de/", 10000);
} catch (e) {                         
}
How could this be achieved? possible in any way?

myBrowser.setConnectTimeout(myInt);
myBrowser.setReadTimeout(myInt);
which you have mentioned

timeout value within getpage is not supported.
but try and catch should work.

..

in respects to mpgai response the method myBrowser.getRequestTime might be a better solution.
Keep in mind Javascript support in JD can contain commands that are wrapped back into JD methods, the Javascript interface is sandboxed.

Timeouts have always been an issue specially to laggy connections within JD Browser. The interface between sockets and GUI has been a problem as it waits for all connections to close before coming responsive again. Large timeout timeframes are not recommended from personal experience, it just makes situation worse. If a connection can't be used in standard times, you're better off not using it.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 22.03.2020 at 01:07.
Reply With Quote