Skip to content

Commit

Permalink
fix: at_lookup - flush socket after write and rethrow any exceptions …
Browse files Browse the repository at this point in the history
…occurred
  • Loading branch information
sitaram-kalluri committed Dec 20, 2024
1 parent 9cd552d commit d03f69b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions packages/at_lookup/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 3.0.50
- fix: Flush socket after write and rethrow any exceptions occurred
## 3.0.49
- build[deps]: Upgraded the following packages:
- at_commons to v5.0.0
Expand Down
2 changes: 2 additions & 0 deletions packages/at_lookup/lib/src/connection/base_connection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ abstract class BaseConnection extends AtConnection {
}
try {
getSocket().write(data);
await getSocket().flush();
getMetaData()!.lastAccessed = DateTime.now().toUtc();
} on Exception {
getMetaData()!.isStale = true;
rethrow;
}
}
}
6 changes: 3 additions & 3 deletions packages/at_lookup/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: at_lookup
description: A Dart library that contains the core commands that can be used with a secondary server (scan, update, lookup, llookup, plookup, etc.)
version: 3.0.49
version: 3.0.50
repository: https://github.com/atsign-foundation/at_libraries
homepage: https://atsign.com
documentation: https://docs.atsign.com/
Expand All @@ -20,5 +20,5 @@ dependencies:

dev_dependencies:
mocktail: ^1.0.1
lints: ^1.0.1
test: ^1.24.9
lints: ^5.0.0
test: ^1.25.8
2 changes: 2 additions & 0 deletions tests/at_onboarding_cli_functional_tests/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ dependency_overrides:
path: ../../packages/at_chops
at_cli_commons:
path: ../../packages/at_cli_commons
at_lookup:
path: ../../packages/at_lookup

dev_dependencies:
lints: ^1.0.0
Expand Down

0 comments on commit d03f69b

Please sign in to comment.