Skip to content

cant assign custom SSLSocketFactory using MPConfig anymore #855

@nadavf24

Description

@nadavf24

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions