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

Network issues can cause same swap to be subscribed to multiple times #704

Open
danielgranhao opened this issue Jan 29, 2025 · 0 comments
Open
Milestone

Comments

@danielgranhao
Copy link
Contributor

danielgranhao commented Jan 29, 2025

I noticed in some logs from an Android device that we were receiving the same swap update messages multiple times.

[BreezSdkLiquid] {INFO} (2025-01-29T09:22:38.576302Z) : Handling incoming Chain Swap transition to "swap.created" for swap V32IGbFZaX3N
[BreezSdkLiquid] {CONFIG} (2025-01-29T09:22:38.577266Z) : Unhandled state for Chain Swap V32IGbFZaX3N: Created
[BreezSdkLiquid] {INFO} (2025-01-29T09:22:38.589110Z) : Successfully handled Chain Swap V32IGbFZaX3N update
[BreezSdkLiquid] {INFO} (2025-01-29T09:22:38.597636Z) : Handling incoming Chain Swap transition to "swap.created" for swap V32IGbFZaX3N
[BreezSdkLiquid] {CONFIG} (2025-01-29T09:22:38.599521Z) : Unhandled state for Chain Swap V32IGbFZaX3N: Created
[BreezSdkLiquid] {INFO} (2025-01-29T09:22:38.611086Z) : Successfully handled Chain Swap V32IGbFZaX3N update
[BreezSdkLiquid] {INFO} (2025-01-29T09:22:38.645093Z) : Handling incoming Chain Swap transition to "swap.created" for swap V32IGbFZaX3N
[BreezSdkLiquid] {CONFIG} (2025-01-29T09:22:38.648171Z) : Unhandled state for Chain Swap V32IGbFZaX3N: Created
[BreezSdkLiquid] {INFO} (2025-01-29T09:22:38.651629Z) : Successfully handled Chain Swap V32IGbFZaX3N update

This proceeds with later updates to the swap:

[BreezSdkLiquid] {INFO} (2025-01-29T09:35:07.973063Z) : Received text msg: "{\"event\":\"update\",\"channel\":\"swap.update\",\"args\":[{\"id\":\"V32IGbFZaX3N\",\"status\":\"transaction.lockupFailed\",\"failureReason\":\"locked 25000 is less than expected 25011\",\"failureDetails\":{\"expected\":25011,\"actual\":25000}}],\"timestamp\":\"1738143306203\"}"
[BreezSdkLiquid] {INFO} (2025-01-29T09:35:08.010845Z) : Received text msg: "{\"event\":\"update\",\"channel\":\"swap.update\",\"args\":[{\"id\":\"V32IGbFZaX3N\",\"status\":\"transaction.lockupFailed\",\"failureReason\":\"locked 25000 is less than expected 25011\",\"failureDetails\":{\"expected\":25011,\"actual\":25000}}],\"timestamp\":\"1738143306208\"}"
[BreezSdkLiquid] {INFO} (2025-01-29T09:35:08.033584Z) : Received text msg: "{\"event\":\"update\",\"channel\":\"swap.update\",\"args\":[{\"id\":\"V32IGbFZaX3N\",\"status\":\"transaction.lockupFailed\",\"failureReason\":\"locked 25000 is less than expected 25011\",\"failureDetails\":{\"expected\":25011,\"actual\":25000}}],\"timestamp\":\"1738143306205\"}"
[BreezSdkLiquid] {INFO} (2025-01-29T09:35:08.038925Z) : Received text msg: "{\"event\":\"update\",\"channel\":\"swap.update\",\"args\":[{\"id\":\"V32IGbFZaX3N\",\"status\":\"transaction.lockupFailed\",\"failureReason\":\"locked 25000 is less than expected 25011\",\"failureDetails\":{\"expected\":25011,\"actual\":25000}}],\"timestamp\":\"1738143306209\"}"

The ws stream loop restarted due to stream errors (network connectivity issues):

[BreezSdkLiquid] {SEVERE} (2025-01-29T09:22:33.246915Z) : Received stream error: Io(Os { code: 103, kind: ConnectionAborted, message: "Software caused connection abort" })

[BreezSdkLiquid] {CONFIG} (2025-01-29T09:22:35.239114Z) : websocket start_send error: IO error: Software caused connection abort (os error 103)
[BreezSdkLiquid] {WARNING} (2025-01-29T09:22:35.241767Z) : Failed to send keep-alive ping: Io(Os { code: 103, kind: ConnectionAborted, message: "Software caused connection abort" })
[BreezSdkLiquid] {SEVERE} (2025-01-29T09:22:35.260384Z) : Received stream error: Protocol(ResetWithoutClosingHandshake)

[BreezSdkLiquid] {SEVERE} (2025-01-29T09:35:03.240286Z) : Received stream error: Io(Os { code: 103, kind: ConnectionAborted, message: "Software caused connection abort" })
[BreezSdkLiquid] {SEVERE} (2025-01-29T09:35:03.248687Z) : Received stream error: Io(Os { code: 103, kind: ConnectionAborted, message: "Software caused connection abort" })

When it restarts, previous subscriptions are still alive, and new ones are created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants