You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Secure Channel consists of a Encryptor Worker and a Handshake/Decryptor Worker. Currently, the proper way to stop a secure channel is implemented here, so both of the Workers are shutdown in that function. Also, the corresponding entry is removed from the Registry. However, that introduces room for inconsistency since a library user may not know about this function or not have access to it (if they don't have access to the SecureChannels instance). In this case, it's very tempting to use ctx.stop_worker() API and shut down only one of the Workers (probably, Handshake/Decryptor Worker, because we primarily use the Encryptor Address after establishing a Secure Channel) or forget to remove the Registry entry.
Desired behavior
The possibility for that mistake could be avoided if calling ctx.stop_worker() with either Encryptor or Decryptor Address would shut down the Secure Channel properly. To achieve that 2 things are needed:
Make one of these Workers remove its entry from the Registry in its shutdown function. Which is this issue.
We love helping new contributors! If you have questions or need help as you work on your first Ockam contribution, please leave a comment on this discussion. If you're looking for other issues to contribute to, checkout this discussion and labels -
good first issue
or
help wanted
The text was updated successfully, but these errors were encountered:
Current behavior
Secure Channel consists of a Encryptor Worker and a Handshake/Decryptor Worker. Currently, the proper way to stop a secure channel is implemented here, so both of the Workers are shutdown in that function. Also, the corresponding entry is removed from the Registry. However, that introduces room for inconsistency since a library user may not know about this function or not have access to it (if they don't have access to the
SecureChannels
instance). In this case, it's very tempting to usectx.stop_worker()
API and shut down only one of the Workers (probably, Handshake/Decryptor Worker, because we primarily use the Encryptor Address after establishing a Secure Channel) or forget to remove the Registry entry.Desired behavior
The possibility for that mistake could be avoided if calling
ctx.stop_worker()
with either Encryptor or Decryptor Address would shut down the Secure Channel properly. To achieve that 2 things are needed:We love helping new contributors!
If you have questions or need help as you work on your first Ockam contribution, please leave a comment on this discussion.
If you're looking for other issues to contribute to, checkout this discussion and labels - good first issue or help wanted
The text was updated successfully, but these errors were encountered: