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

feat: Added setting for http reuse (keep-alive) #154

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

sschueller
Copy link
Contributor

@sschueller sschueller commented Aug 16, 2024

This PR adds a configuration option to set the "http reuse" aka keep-alive.

cfg.allow_reuse = false;  // disables keep alive and kills connection when done

Some time after framework-arduinoespressif32 @ 3.20003.220626 (2.0.3) the heap usage drastically increased for https calls. If one has a project that makes https calls as well as the esp32FOTA library the heap can get to a point where one runs out of memory.

Since OTAs are generally not something that gets done a lot it should not consume too much of the heap especially if there is no update.

This option reduces the used heap by around 40k after OTA check call is done.

I wasn't sure if I should add this as a function or in the configuration. Please let me know if you would like any changes done.

@tobozo
Copy link
Collaborator

tobozo commented Aug 17, 2024

that makes a lot of sense, thanks!

@tobozo tobozo merged commit cca338b into chrisjoyce911:master Aug 19, 2024
3 checks passed
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.

2 participants