Timeout implementation - WeOnlyDo Discussion board

Timeout implementation (General questions)

by dirk, Thursday, May 17, 2012, 15:05 (4371 days ago)

When the wodHTTPDLX component connects to a site with a 2 seconds timeout, then this timeout is the actual time there is not traffic going from the webserver to the component. This means that if the webserver is very slow and send (example) 1 char per second and needs to send 20000 chars; then it will take ages to get the full page and you won't get the timeout.

I tried to force my own timeout by setting a component.disconnect in one of the events (using the fast notification interface) , but that isn't working.
Any thought how I can enforce a real timeout?

Re: Timeout implementation

by woddrazen, Thursday, May 17, 2012, 15:20 (4371 days ago) @ dirk

Hi Dirk,


Why don't you implement your own timer and call Abort or Disconnect Method if time inside timer is reached?

Let us know how it goes.


Regards,
Drazen

Re: Timeout implementation

by dirk, Thursday, May 17, 2012, 15:26 (4371 days ago) @ woddrazen

Hi Dirk,


Why don't you implement your own timer and call Abort or Disconnect Method if time inside timer is reached?

Let us know how it goes.


Regards,
Drazen


As we're using multiple wodHTTP threads using our own timer is kind of difficult, that's why I wanted to implement this within one of the wodHTTP events (fast notification). With a .disconnect it's not working correctly, with the .abort it seems to be working fine. Will continue the testing using .abort instead of .disconnect.