Skip to content

Commit

Permalink
feat: sleep 5 seconds if sshnp atSign is not activated inside of sshnpd
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyTubongbanua committed Jun 27, 2023
1 parent 51781b9 commit f6fb133
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/sshnpd.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ Future<void> _main(List<String> args) async {
atClient = AtClientManager.getInstance().atClient;

// check if sshnp atSign exists
if(!(await atSignIsActivated(atClient, managerAtsign))) {
throw ('\nManager atSign $managerAtsign is not activated');
while(!(await atSignIsActivated(atClient, managerAtsign))) {
await Future.delayed(Duration(seconds: 5));
logger.warning('Waiting for $managerAtsign to be activated...');
}

NotificationService notificationService = atClient.notificationService;
Expand Down

0 comments on commit f6fb133

Please sign in to comment.