-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: make ConnectivityListener configurable, and remove unnecessary network availability checks #1100
Conversation
refactor: refactored Monitor unit tests to depend on ability to create a connection rather than network availability
…ing AtConnectExceptions where previously they relied on having calls to a mockNetworkUtil.isNetworkAvailable return false
…or existence of an atSign
…or existence of an atSign
…eImpl (not part of public interface of that class, only used for testing
…o ConnectivityListener constructor and use accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hate that connectivity listener uses tcp rather than ICMP
Another process wrap but well done https://pub.dev/packages/dart_ping And some discussion on the topic |
ConnectivityListener is ours; it wraps InternetConnectivityChecker Neither are being used by at_client any more so 🤷♂️ |
…gurable-network-checks # Conflicts: # packages/at_client/CHANGELOG.md
Now that at_client makes no use of it, I'd be happy to mark at_client's ConnectivityListener class as Deprecated and leave it to programs to use whatever they want to instead, since really it's nothing to do with AtClient |
docs: update `@Deprecated` message for `RemoteSecondary.isAvailable`
- add direct dependency on asn1lib - pin versions for asnlib, crypton and encrypt packages
Checks currently failing because one of our cicd hosts is down |
Checks complete thank you @cpswan |
@@ -111,7 +111,8 @@ class AESDecryptionSink extends ChunkedConversionSink<List<int>> { | |||
|
|||
IV getIV(String? ivBase64) { | |||
if (ivBase64 == null) { | |||
return IV.fromLength(16); | |||
// From the bad old days when we weren't setting IVs | |||
return IV(Uint8List(16)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is a defensive measure to prevent the next release of the encrypt
package from causing us problems, as the behaviour of IV.fromLength
has changed
@@ -12,7 +12,8 @@ class EncryptionUtil { | |||
|
|||
static IV getIV(String? ivBase64) { | |||
if (ivBase64 == null) { | |||
return IV.fromLength(16); | |||
// From the bad old days when we weren't setting IVs | |||
return IV(Uint8List(16)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is a defensive measure to prevent the next release of the encrypt
package from causing us problems, as the behaviour of IV.fromLength
has changed
Everything works as expected thanks @gkc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested by hand as well as via Ci/CD
Closes #1099
See analysis here which led to the changes in this PR
@Deprecated
and where (b) the usage is non-problematic (checks if atServer's host and port are reachable)- What I did
RemoteSecondary.isAvailable()
expect
s- How I did it
- How to verify it
Tests pass
- Description for the changelog
feat: Make
ConnectivityListener
configurable by adding optional parameters to its constructor.feat: Remove unnecessary use of network availability checks in various places