Clear join-session cache only on connect_document_error
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.
Could not find a usable baseline build with search starting at CI f4ec8f878ef7cb20773faa4b1fb90c3df62adaef
Generated by :no_entry_sign: dangerJS against 6b5064c0a28a8a78f5de020bf250da96218bbddf
Looks good to me.