Simplify HttpClient global AbortSignal handling - #4108
Conversation
Performance Report鉁旓笍 no performance regression detected Full benchmark results
|
| this.logger = logger ?? null; | ||
| } | ||
|
|
||
| setAbortSignal(signal: AbortSignal): void { |
There was a problem hiding this comment.
should this only be allowed once? Eg: if (this.signal) throw .. else this.signal = signal
There was a problem hiding this comment.
No, to allow the validator client to work it must allowed N times. Every time the validator is started a new signal is created, so it must be set to the HttpClient every time.
There was a problem hiding this comment.
I forget that our validator can start and stop (and restart). I still think its weird.
ightevenmckane1
left a comment
There was a problem hiding this comment.
Looking back on mergers and file changes and deletions and restrictions on main branches.Like to know more on these changes.
|
closing in favor of #4178 and subsequent refactors that it allows. |
Motivation
Simplify how global signals are provided to the HttpClient instance.
Description
Instead of providing a function to get the global signal everytime, add a method to update the global signal only when necessary. In my opinion it makes consuming the library less awkward, and this complexity is hidden for consumers that don't need to update the signals.