You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constmethodClient=newMethodClient(authenticationProvider);methodClient.setOptions({ ca });
However, MqttBase.setOptions does not merge _options, so calling setOptions method in the callback of ModuleClient.fromEnvironment will overwrite the ca option, resulting in a certificate error.
Context
Description of the issue
The
ca
option is set in _fromEnvironmentEdge function.However,
MqttBase.setOptions
does not merge_options
, so callingsetOptions
method in the callback ofModuleClient.fromEnvironment
will overwrite theca
option, resulting in a certificate error.Code sample exhibiting the issue
Console log of the issue
Workaround
Get the current options from
client._methodClient._options
(there is notgetOptions
method!) and merge them by yourself.The text was updated successfully, but these errors were encountered: