Closed Xon closed 6 years ago
@slact is that acceptable? Passing a negative into setTimeout should get clamped to 0 as a minimum. Well for anything more modern than IE8
I would rather accept just the stop()
fix without the pollDelay
infrastructure -- that should be another separate PR, and it would need to be one that exposes the delay setting to the user.
I'll pull them apart since it is so small.
I'll send through a pull request once I figure out how to expose the pollDelay outside the transport
Currently with long polling calling stop() on the NchanSubscriber object from within the 'message' event does nothing because the longpolling transport will recreate the request and keeps going anyway.
Second, I've introduced infrastructure to support adding delay between polling attempts.
I'm currently groveling in the transport in my application code to setup the
pollDelay
setting. A better way to configure each transport is something I plan to look at later once I start using the other transport types.