This is regards to an issue that is as old as MC and relates to what happens when a website such as TMDB or TVDB is down.
Here is an example of the code that is used;
- Code:
-
Dim wrGETURL As WebRequest
wrGETURL = WebRequest.Create(url)
Dim thisProxy As New WebProxy("thisproxy", 80)
thisProxy.BypassProxyOnLocal = True
Dim objStream As Stream
objStream = wrGETURL.GetResponse.GetResponseStream()
Dim objReader As New StreamReader(objStream)
page = objReader.ReadToEnd
This works OK most of the time, the problem is when the "url" is not available for some reason. MC stands still until it times out which is way too long, I tried adding the following to the code;
- Code:
-
wrGETURL.Timeout = 5000
The idea being that the webrequest would timeout after 5 seconds, but it has no effect whatsoever
I could create a separate thread for each of these, but it would take a lot of time and code and is in my opinion, a very complicated solution for a simple problem.
Any help would be appreciated.