We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed9412a commit 3cebcaeCopy full SHA for 3cebcae
MDFe.Utils/Configuracoes/MDFeConfiguracao.cs
@@ -190,14 +190,15 @@ public void Dispose()
190
191
private void LimparCertificado()
192
{
193
- var naoDeveManterCertificadoEmCache =
194
- !ConfiguracaoCertificado.ManterDadosEmCache && _certificado != null;
+ var deveManterCertificadoEmCache = _certificado == null ||
+ ConfiguracaoCertificado == null ||
195
+ ConfiguracaoCertificado.ManterDadosEmCache;
196
- if (naoDeveManterCertificadoEmCache)
197
- {
198
- _certificado.Reset();
199
- _certificado = null;
200
- }
+ if (deveManterCertificadoEmCache)
+ return;
+
+ _certificado.Reset();
201
+ _certificado = null;
202
}
203
204
0 commit comments