Skip to content

Commit

Permalink
Merge pull request #1207 from atsign-foundation/gkc/fix-1182
Browse files Browse the repository at this point in the history
fix: When running npt in keep-alive mode then the keep-alive loop should never exit due to an exception from `npt.run()`
  • Loading branch information
gkc authored Aug 8, 2024
2 parents f22570a + 6a234db commit 787ad3e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/dart/sshnoports/bin/npt.dart
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,18 @@ void main(List<String> args) async {
if (!keepAlive) {
throw SshnpError(e.toString());
}
} on SshnpError catch (e) {
logProgress(e.toString());
await npt.close();
if (!keepAlive) {
rethrow;
}
} catch (e) {
logProgress(e.toString());
await npt.close();
if (!keepAlive) {
rethrow;
}
}

await npt.done;
Expand Down

0 comments on commit 787ad3e

Please sign in to comment.