Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Can't reconnect mediator after connection terminated from server side #3349

Open
borancar opened this issue Aug 26, 2022 · 0 comments · May be fixed by #3352
Open

Can't reconnect mediator after connection terminated from server side #3349

borancar opened this issue Aug 26, 2022 · 0 comments · May be fixed by #3352

Comments

@borancar
Copy link
Contributor

What I'm trying to do

I'm using AFGO WASM and I'm trying to reconnect to all the mediators using mediator.reconnectAll() after one connection timed out from the server side and was reported as "Closing Abnormally" (I know, the server was not the friendliest and just sad "Going away" as the status, but that's AWS API GW for you...).

Expected result

The app should reconnect to the mediator.

Actual result

I get the following error

Error: aries wasm: code: 5006, message: send noop request: outboundDispatcher.Send: failed to send msg using outbound transport: websocket write message : failed to write: WebSocket closed: unclean connection close: status = StatusAbnormalClosure and reason = ""

Root cause

This was was actually difficult to spot! But the root cause is nothing cleans up the abnormally terminated connections. If you check the function below, verKeys always stays an empty array:

https://github.com/hyperledger/aries-framework-go/blob/6c0c224401eed96cc4ad6d8478664374885596fc/pkg/didcomm/transport/ws/pool.go#L82-L96

@borancar borancar linked a pull request Aug 26, 2022 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant