Closed Xon closed 6 years ago
@slact any feedback on this?
I was thinking if the options should be namespaced to opt.longpoll.delay -- this way there will be a clean way to address #9 . but then specifying the options gets a little clunkier - {subscriber: "longpoll", longpoll: {delay: 100}}. Overall, I think I would prefer the namespaced approach. What do you think?
Namespacing the options makes a bunch of sense, it is a bit more clunky but not by much.
@slact I've pushed some minor cleanup on this. Ensured that any cancelling goes via longpoller's cancel()
method to ensure everything is cleaned up.
Add's a configurable delay between polling, and support for changing the polling period without a full stop/start cycle.
I'm not sure if this is the best way to implement
reschedulePendingPollRequest
, but the entire polling period bit is entirely specific to the long poll transport type.