FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Clear join-session cache only on connect_document_error

Open pragya91 opened this issue 1 year ago • 1 comments

The response of joinSession api is saved in the cache (for the duration it is valid) so that, in case there is a socket disconnect, we can use the same socket endpoint from the cache instead of making a new joinSession network request. Up until now, the odsp-driver code was clearing the cache on any error that occurred on the socket, which is incorrect.

This PR changes the code such that it only clears the cache if the error is a fluid protocol error (connect_document_error), and does not clear the cache if the error is socket.io error (connect_error).

This PR also changes the name of handler variable name to socketEvent variable name. Because it is more accurately represents what the property is.

AB#7833

pragya91 avatar Apr 23 '24 22:04 pragya91

Could not find a usable baseline build with search starting at CI f4ec8f878ef7cb20773faa4b1fb90c3df62adaef

Generated by :no_entry_sign: dangerJS against 6b5064c0a28a8a78f5de020bf250da96218bbddf

msfluid-bot avatar Apr 23 '24 23:04 msfluid-bot

Looks good to me.

jatgarg avatar May 08 '24 18:05 jatgarg