Skip to content

Commit

Permalink
refactor: minor refactoring in RemoteSecondary
Browse files Browse the repository at this point in the history
  • Loading branch information
srieteja committed Jan 10, 2024
1 parent 07ef40f commit 5a724a8
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions packages/at_client/lib/src/client/remote_secondary.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ class RemoteSecondary implements Secondary {
logger = AtSignLogger('RemoteSecondary ($_atSign)');
_preference = preference;
privateKey ??= preference.privateKey;
SecureSocketConfig secureSocketConfig = SecureSocketConfig();
secureSocketConfig.decryptPackets = preference.decryptPackets;
secureSocketConfig.pathToCerts = preference.pathToCerts;
secureSocketConfig.tlsKeysSavePath = preference.tlsKeysSavePath;
SecureSocketConfig secureSocketConfig = SecureSocketConfig()
..decryptPackets = preference.decryptPackets
..pathToCerts = preference.pathToCerts
..tlsKeysSavePath = preference.tlsKeysSavePath;
atLookUp = AtLookupImpl(atSign, preference.rootDomain, preference.rootPort,
privateKey: privateKey,
cramSecret: preference.cramSecret,
Expand Down Expand Up @@ -107,14 +107,8 @@ class RemoteSecondary implements Secondary {
// ignore: prefer_typing_uninitialized_variables
var verbResult;
try {
logger.finer(logger.getLogMessageWithClientParticulars(
_preference.atClientParticulars,
'Command sent to server: ${builder.buildCommand()}'));
verbResult = await executeVerb(builder);
verbResult = verbResult.replaceFirst('data:', '');
logger.finer(logger.getLogMessageWithClientParticulars(
_preference.atClientParticulars,
'Response from server: $verbResult'));
} on AtException catch (e) {
throw e
..stack(AtChainedException(Intent.fetchData,
Expand Down

0 comments on commit 5a724a8

Please sign in to comment.