-
Notifications
You must be signed in to change notification settings - Fork 370
Open
Description
Because MPConfig is not a singleton anymore, you can't just call
MPConfig.getInstance(context).setSSLSocketFactory(someCustomizedSocketFactory)
If you try to call MPConfig.getInstance
using the instance name you used for your MixpanelAPI, the internal mConfig instance and the one you would get from MPConfig.getInstance(context, InstanceName)
will not be the same, so you can't assign the SSLSocketFactory.
The fix you should implement is when you call MPConfig.getInstance(context, InstanceName)
, it should look for an already generated config instance from a map of all the generated instances. If one already exists using the same instance name, it should be returned instead of creating a new instance every time.
Copilot
Metadata
Metadata
Assignees
Labels
No labels