Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Timeout or abort page loading

Post Reply
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

Timeout or abort page loading

Post by dilfich »

"Timeout or abort page loading"
How to do it correctly? For example, I wait 10 seconds, this is if through a proxy and it is slow, I do something like about:blank, I change the proxy and open it again, but sometimes nothing happens. More precisely, the link opens in 30-60 seconds, with an error or successfully.
""Stop Load" before reloading does not help.
How to finally and correctly abort the loadUrl procedure? :?:
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Timeout or abort page loading

Post by salvadordf »

Stop is asynchronous and it may take a little time.

There is another method called TCefRequestContextRef.CloseAllConnections but I've never used it and it's only recommended for special cases. These are the code comments for that method :

Code: Select all

  ///
  // Clears all active and idle connections that Chromium currently has. This is
  // only recommended if you have released all other CEF objects but don't yet
  // want to call cef_shutdown(). If |callback| is non-NULL it will be executed
  // on the UI thread after completion.
  ///
However, if you want to be sure then destroy that browser and create a new one with the new proxy settings to open the URL again.
Post Reply