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

sessionListeners are lost during reconnect #2

Open
sacrelege opened this issue Dec 19, 2022 · 3 comments
Open

sessionListeners are lost during reconnect #2

sacrelege opened this issue Dec 19, 2022 · 3 comments

Comments

@sacrelege
Copy link

NodeClient.class line 138 resets session before creating a new one. As far as I can tell, this means all prev. set listeners are lost and not restored upon reconnect.

@satran004
Copy link
Member

If it's about SessionListener, start method is called again inside disconnect(). And in L69, the existing sessionListener is added to the new session.
But agent listeners (which are application specific) are added to individual agents.

Fyi, please check BlockSync / BlockRangeSync high level apis if your use case is specific to block synchronization or block fetch for a range.

@sacrelege
Copy link
Author

Its was about
LocalClientProvider.addTxSubmissionListener(..)
I think any set txSubmission listeners are lost upoin reconnect.

I'm using socat to connect to a remote node and experiencing reconnects after a while and it seems, I don't get any responses after the reconnect. but it also think tx submission doesn't work at all after the reconnect.. I guess have some bigger issues I have to investigate first.

@satran004
Copy link
Member

@sacrelege Thanks. That’s an agent listener.
Ideally client should auto recover. Let me try to reproduce and find the root cause.

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