Skip to content
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

OOB invitation not deleted when using use_existing_connection #1511

Closed
ffendt opened this issue Nov 23, 2021 · 2 comments · Fixed by #1521
Closed

OOB invitation not deleted when using use_existing_connection #1511

ffendt opened this issue Nov 23, 2021 · 2 comments · Fixed by #1521
Assignees

Comments

@ffendt
Copy link

ffendt commented Nov 23, 2021

When having an active connection between two agents and using the use_existing_connection flag when receiving another invitation from the inviter using the Out-Of-Band protocol, the invitation doesn't get deleted at the inviter. I would expect the invitation to be deleted in the database of the inviter.

Steps to reproduce (which will hopefully make my very long sentence above more understandable):

  • Create an OOB invitation at the inviter
  • Receive the invitation at invitee
  • Continue to establish the connection until it's active (I had auto_accept=true on both agents)
  • Create another OOB invitation at the inviter
  • Receive the invitation at invitee with flag use_existing_connection=true
  • invitee immediately get's back the previously created and still active connection
  • The invitation remains in the database of the inviter. There are two connections when querying the /connections endpoint: one is the still active connection, one is the invitation pending in state invitation

Is it expected that the invitation will remain at the inviter? In my opinion, this will pollute the database with already used invitations.

@shaangill025
Copy link
Contributor

shaangill025 commented Nov 25, 2021

@ffendt PR #1521 (more details), deletes stale ConnRecords which were last updated at least 3 hours back. The trigger for this is creating an OOB invitation, so whenever a new OOB invitation is created then this cleanup is performed. Does this strategy sound reasonable?

Never mind, I am reworking the approach after getting some feedback. I will update once that is done.
The fix is ready.

@ffendt
Copy link
Author

ffendt commented Nov 26, 2021

@shaangill025, thanks for the quick PR. I'll close this issue for now.

@ffendt ffendt closed this as completed Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants