hi guys,
I am having problem with reconnect
ing channel. I call the channel.leave()
method to leave the chanel. But when I try to reestablish the connection, I see the following events: connected
-> disconnected
.
This is piece of code I am using to reconnect:
let ch = await Channel({
...params,
role: params.role,
port: params.port,
existingChannelIdKey : channelId,
offchainTx,
sign: getTxCb(keyPair)
})
where,
-
offchainTx
: is the signed tx which I got when I had called leave()
-
existingChannelIdKey
: is the channel id.
1 Like
Also there is one more problem, I tried using this piece of code and it looks like it got reconnect but this time, the ch.id()
is coming undefined
on the event open
…
let ch = await Channel({
url: params.url,
host: params.host,
port: params.port,
role: params.role,
existingChannelId: channelId,
existingFsmId: channelData.fsmId,
offchainTx,
sign: getTxCb(keyPair)
})
So these are the sequence of activity I did and got stucked in 2nd time reconnection.
- Created
- Updated
- left
- reconnected
- updated
- left
- reconnect [ERROR]
So when I left the channel for the second time, and tried reconnecting, I see ch.fsmId()
as well as ch.id()
both as undefined
Hey @dimitar.chain can you take a look, please?
Since at this point this is a SDK question, I summon @nduchak.chain. If it is a FSM issue, I will take over.
1 Like
hey,
I will investigate this and get back to you as soon as it will be done.
But looks like that reconnection flow is broken in current implementation
3 Likes