Skip to content

Conversation

@vikramdattu
Copy link

Why is esp_task_wdt_reset needed?:

  • If the task is running for longer without yielding, this leads to the task watchdog to trigger, then one should reset the task watchdog with the mentioned API.

Points under consideration while removing the call:

  • lws_service() function call is not unyielding, meaning, it does wait on socket select. Even if this function is called in a loop, it should be the caller's responsibility to yield or call esp_task_wdt_reset.
  • Rightly so, the examples here do yield calling taskYIELD
  • Calling esp_task_wdt_reset without calling esp_task_wdt_add has no real use and only leads benign errors.

lws-team and others added 3 commits January 22, 2025 10:10
Google's fuzzer platform blows a warning

/src/libwebsockets/lib/plat/unix/unix-sockets.c:497:21: warning: implicit conversion loses integer precision: 'uint32_t' (aka 'unsigned int') to '__be16' (aka 'unsigned short') [-Wimplicit-int-conversion]
  497 |         sll.sll_protocol = (uint32_t)(htons((uint16_t)0x800));
 - Also removed some esp_wdt specific unnecessary header includes
@vikramdattu
Copy link
Author

cc @Harshal5

@glmfe
Copy link

glmfe commented Mar 24, 2025

@lws-team the libwebsockets library has been added as a managed component of esp-protocols, and merging this PR is crucial for us to move forward with adding other example codes, such as a server instance.

@lws-team
Copy link
Member

Can I suggest you take a more sensitive approach to what is already there than randomly ripping it out?

It's not like what is there is so golden it must last a thousand years, but, there are users of the existing code such as Amazon. since it is enabled on AMAZON_FREERTOS currently, I think that should remain so for them.

If you want to avoid what it is doing, then use a cmake define to override, defeating it or somesuch, rather than act like esp is the only user of it.

@lws-team lws-team force-pushed the main branch 23 times, most recently from 14e29e7 to 1b15995 Compare April 25, 2025 06:31
@lws-team lws-team force-pushed the main branch 5 times, most recently from a0c73c1 to 7c9d4bc Compare September 9, 2025 14:28
@lws-team lws-team force-pushed the main branch 12 times, most recently from a800d4a to 7f2f518 Compare September 18, 2025 08:03
@lws-team lws-team force-pushed the main branch 3 times, most recently from baf4897 to 0c7fa23 Compare October 1, 2025 14:55
@lws-team lws-team force-pushed the main branch 3 times, most recently from 2b74af4 to 5f77374 Compare October 12, 2025 10:02
@lws-team lws-team force-pushed the main branch 5 times, most recently from a677221 to 0c67054 Compare October 24, 2025 16:36
@lws-team lws-team force-pushed the main branch 2 times, most recently from f5fa440 to 278c671 Compare November 6, 2025 08:28
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

Successfully merging this pull request may close these issues.

3 participants