question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Interceptors array potentially growing indefinitely

See original GitHub issue

Hi,

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:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
viktoriiakrausecommented, Feb 26, 2019

Hi! Are there any updates on this issue?

0reactions
jasonsaaymancommented, Jun 25, 2020

Hi,

Please read more on this issue over at #1914

Thanks

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found