-
Notifications
You must be signed in to change notification settings - Fork 517
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
Perform ACM-triggered cloud connection migration without a disconnect #2863
base: test/v6.3.0
Are you sure you want to change the base?
Perform ACM-triggered cloud connection migration without a disconnect #2863
Conversation
communication/src/dtls_protocol.h
Outdated
@@ -115,6 +115,13 @@ class DTLSProtocol : public Protocol | |||
} | |||
return r; | |||
} | |||
case ProtocolCommands::MOVE_CONNECTION: { | |||
LOG(INFO, "Moving connection (session move + ping)"); | |||
if (!channel.command(Channel::MOVE_SESSION)) { |
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.
Any reason not to return the actual error code instead of UNKNOWN
if this fails?
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.
🤷 fixed. And added one session use.
@@ -361,3 +361,22 @@ int system_cloud_get_inet_family_keepalive(int af, unsigned int* value) { | |||
|
|||
return 0; | |||
} | |||
|
|||
int system_cloud_move_connection(network_handle_t network) { | |||
if (system_cloud_is_connected(nullptr)) { // XXX: this is not a bool! |
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.
😅
5ddf34c
to
f872b50
Compare
7cb439e
to
acc62d5
Compare
acc62d5
to
0e48bfe
Compare
TODO
Add stress test
Problem
After performing an initial cloud connection, ACM will re-evaluate this decision (if there are multiple network interfaces available) and might decide to migrate the connection. This is currently performed by disconnect, session move and re-connect.
Solution
This instead can be performed without tearing down the cloud connection and just re-binding the underlying socket + indicating to the comms layer that session move + ping needs to be performed.
This PR also fixes
slo/connect_time
test with test runner-forced network (--network=X
option).Log
Having connected to the cloud over cellular, migrating to a connection over wifi:
References
Links to the Community, Docs, Other Issues, etc..
Completeness