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

how to abort the streaming request? #204

Open
hoogw opened this issue Jan 15, 2020 · 1 comment
Open

how to abort the streaming request? #204

hoogw opened this issue Jan 15, 2020 · 1 comment

Comments

@hoogw
Copy link

hoogw commented Jan 15, 2020

I know that oboe(url).node(0.done() can streaming json
when stream ended, done(function(){}) was called.

I have need to abort this streaming before it done().

for example fetch.abort api

use controller.abort(); abort signal.

Would oboe have such similar, so I can oboe.abort() or controller.abort()..... or what ever I can
abort the stream before it fire .done() ?

@hoogw
Copy link
Author

hoogw commented Jan 15, 2020

oboe use xhr, should have abort function, like xhr.abort ... or fetch abort etc...

90% of my mapping web page, need to abort ajax, abort fetch etc... because otherwise, when user pan the map, continuously, each pan/zoom map will fire a stream request, so a chain of streaming request piled up, user have to wait long time until all other stream ended one by one to get the latest usefull stream started, it is horrible user experience. We want abort all other stream, only keep the latest stream live.

Please advise how to abort stream before it ended?

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

1 participant