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

ping/pong is not working #522

Open
ovnicraft opened this issue Dec 26, 2023 · 2 comments
Open

ping/pong is not working #522

ovnicraft opened this issue Dec 26, 2023 · 2 comments
Assignees
Labels
defect Suspected defect such as a bug or regression

Comments

@ovnicraft
Copy link

Observed behavior

After connection stablished, if connection goes stale ping/pong is not being executed.

after my debug i found:

_process_connect_init() is defining ping_interval_task and it process error for stale connections but task it self is never being called. (at least I could not find it.)

EXTRA: this issue could be related.

Expected behavior

stale connection being processed allowing developer catch it.
logs here

Server and client version

nats 2.10 (alpine image).

Host environment

macos m1

Steps to reproduce

  1. start nats server
  2. connect to server
  3. wait 10s
  4. stop server
  5. you can wait on client and is not ping/poing ing.
@ovnicraft ovnicraft added the defect Suspected defect such as a bug or regression label Dec 26, 2023
@wallyqs wallyqs self-assigned this Dec 26, 2023
@wallyqs
Copy link
Member

wallyqs commented Dec 26, 2023

Thanks for raising the issue, the ping interval is working which you can confirm reducing the ping interval to be lower for example:

    nc = await nats.connect("nats://127.0.0.1:4222",
                            error_cb=_error_cb,
                            ping_interval=2,

I did confirm that the error callback is not reporting the type of disconnection so will fix that.

@ovnicraft ovnicraft changed the title ping/ping is not working ping/pong is not working Feb 1, 2024
@stankudrow
Copy link

@wallyqs , need some help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

3 participants