Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting a timeout greater than 0 in webRead() fails with error 500 #2008

Closed
raohmaru opened this issue Jun 3, 2020 · 2 comments
Closed

Setting a timeout greater than 0 in webRead() fails with error 500 #2008

raohmaru opened this issue Jun 3, 2020 · 2 comments

Comments

@raohmaru
Copy link

raohmaru commented Jun 3, 2020

In the global function webRead(url, timeout = 0), if the timeout parameter is greater than 0, then OCTGN answers with the following error and no request is made:

Unknown Error: System.Net.WebException: The operation has timed out\r\n at >System.Net.HttpWebRequest.GetResponse()\r\n at >Octgn.Scripting.Versions.Script_3_1_0_2.DoWebRequest(String url, Int32 timeout, String data)
500

@raohmaru raohmaru changed the title Setting a timeout greater than 0 in webRead() fails with error 500 Setting a timeout greater than 0 in webRead() fails with error 500 Jun 3, 2020
@brine
Copy link
Contributor

brine commented Jun 3, 2020

the timeout is in milliseconds, so its possible that the method is correctly timing out before the web page can finish loading? I've tested this and it seems to be correctly timing out for small values

@raohmaru
Copy link
Author

raohmaru commented Jun 4, 2020

You are right, I thought that the timeout was in seconds like in time.sleep().
My bad for not reading carefully the documentation :(

@raohmaru raohmaru closed this as completed Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants