Closed hthetiot closed 6 years ago
I would think better terminology might be:
maximumReconnectInterval: 4000,
accelerationStrategy: "always" or "connected"
accelerationStrategy
states when do you accelerate URLs.
Value always
means always/don't make requests if they are proxied but no ws connection is open. Wait for the connection to open instead.
Value connected
means make requests when connected via websocket.
I don't think we need "reconnectAuto": true, As this should always be true. Is there some usecase to set this as false?
Note, this does change existing properties, but I think it would be best to do a sweeping change now as were are now adding a feature that makes it likely the other values will actually be needed.
I don't think we need "reconnectAuto": true, As this should always be true. Is there some usecase to set this as false?
This can be really useful to debug initial connection failure instead of having the logs always trying to reconnect.
Overview
The goal is to fall-back the pending XHR requests there were waiting for the proxy connection (configuration emit
completed
) to origin server by removing the proxy config on connection failure and add it on reconnection success (transport responseopen
).Example:
Current (
reconnectAuto
: true andreconnectAutoDelay
of 100ms *perReconnectFailureAttempt
)New Options
accelerationStrategy
andmaximumReconnectInterval
Will pursue reconnection attempt per reconnectAutoDelay interval but trigger
completed
on failure whentrue
for pending XHR to procced.Entry points: