Interceptors array potentially growing indefinitely
See original GitHub issueHi,
While testing my application, i notice that the handlers
array of axios interceptors only increase, even if i use the eject
method.
In fact, eject
only nullify interceptor entry
https://github.com/axios/axios/blob/a105872c1ee2ce3f71ff84a07d9fc27e161a37b0/lib/core/InterceptorManager.js#L32
and use
always push new handler and return length - 1
https://github.com/axios/axios/blob/a105872c1ee2ce3f71ff84a07d9fc27e161a37b0/lib/core/InterceptorManager.js#L22
Is it not dangerous (or expensive) to have this type of behaviors?
Regards
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Angular HTTP Interceptors : Multiple Interceptors and 6 Code ...
Interceptors are used in Angular to Intercept HttpRequest/HttpResponse. ... represents the array of HttpInterceptor s that are registered.
Read more >FAQ - The Ocean Cleanup
How long will the cleanup take? To what depth do you need to clean up? How can I help support your mission? Find...
Read more >Weld 5.1.0.Final - CDI Reference Implementation - JBoss.org
If you don't want the bean to sit in the session indefinitely, consider using another scope with a shorted lifespan, such as the...
Read more >slonik - npm
However, what once was a collection of utilities has since grown into a framework that ... (Default: 5000) * @property interceptors An array...
Read more >Documentation - Apache Kafka
A list of classes to use as interceptors. Implementing the org.apache.kafka.clients.producer.ProducerInterceptor interface allows you to intercept (and possibly ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi! Are there any updates on this issue?
Hi,
Please read more on this issue over at #1914
Thanks