Get/Post URL Text Timeout?
-
Is it possible to force a time-out value for Get/Post URL Text actor? I have to send GET, but would love to be able to constrain the time allowed to not respond to something like 3 seconds.
My use-case is: I have a device (ok: 6 devices) on network that normally responds within 300ms, and I need to send for updates every 5-10 seconds. When one gets stuck waiting for response, my logging grows out-of-sync. Non-response beyond 3 seconds, in this case, should be seen as a failed connection.
Ideally, I'd never have "Busy" = 1 for more than a given duration, like 3 seconds.
Happy to hear your thoughts on the matter.
Thank you for all that you do,
Chad
-
This is untested.. however it might work.
If you wrap your Get into an user actor, and include a timeout counter, that then toggles the On/Off of the User Actor.. the User Actor will re-initialize.. so the request should be stopped (again untested).
Something like this:
You would use the 'timeout' to toggle Off, then On the User actor. (so some additional patching for this on the outer for the User Actor.
Shouldn't take long to test. Let me know if this works :) -
@dusx Thank you! Not a bad idea! I'll give that a shot, but it's going to be a bit before I can get back to it... will update when I know.