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

Websocket Ping / PONG sending out after every 5 mint #3158

Open
sush126 opened this issue May 31, 2024 · 4 comments
Open

Websocket Ping / PONG sending out after every 5 mint #3158

sush126 opened this issue May 31, 2024 · 4 comments

Comments

@sush126
Copy link

sush126 commented May 31, 2024

Hi @lws-team,

I am working on a client application where I have set the following retry policies using the API:

lws_client_connect_via_info(pCcInfo);

lws_retry_bo_t retry = {
.secs_since_valid_ping = 12, /* force PINGs after 12 secs idle /
.secs_since_valid_hangup = 14, /
hangup after 14 secs idle */
};
Additionally, I am resetting these retry policies every 10 seconds if I find a valid probe. However, I still see PING messages being sent by libwebsockets after every 5 minutes.

i am using lws_validity_confirmed() api to reset this retry .

Could you please suggest any thing if i missed here ?

@lws-team
Copy link
Member

Are you actually using retry somewhere to pass it to lws?

@sush126
Copy link
Author

sush126 commented May 31, 2024

I am using the lws_client_connect_via_info API to configure retry policies for my client connection. Before calling this API, I have created a virtual host (vhost) and passed it to lws_client_connect_via_info.

@lws-team
Copy link
Member

Does it help to pass it in the context creation struct instead?

@sush126
Copy link
Author

sush126 commented May 31, 2024

Do you mean to say I should pass this retry policy in the structure struct lws_context_creation_info *info? Also, I am calling lws_create_vhost after creating the context. Should I pass this retry policy in the lws_create_vhost API?

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