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

Memory leak when using keep-alive #790

Closed
parnham opened this issue Sep 19, 2019 · 2 comments · May be fixed by cleohari/civetweb#6
Closed

Memory leak when using keep-alive #790

parnham opened this issue Sep 19, 2019 · 2 comments · May be fixed by cleohari/civetweb#6

Comments

@parnham
Copy link

parnham commented Sep 19, 2019

Platform: linux
Version: 1.11
Usage: embedded

When using keep-alive the get_request(...) function overwrites the host name in the connection having already been allocated on a previous request.

conn->host = alloc_get_host(conn);

Since the host should not be changing between requests then the above call can probably be skipped if it's non-null.

@parnham
Copy link
Author

parnham commented Sep 19, 2019

Ignore this - I hadn't noticed that v1.11 was from September last year and not this year. The issue has already been fixed in master.

@parnham parnham closed this as completed Sep 19, 2019
@kimaluco17
Copy link

kimaluco17 commented Nov 18, 2019

My team also ran into this issue when many requests are being sent out to Civetweb at once from the same client with keep-alive turned on.

In case anyone wants to know the fix, the commit is here: 96e3e8c

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 a pull request may close this issue.

2 participants