You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use HttpClient::downloadString to send an api ping to other devices with the callback implemented as a lambda.
Since I send out a number of pings in parallel, the callbacks all use up memory for a time.
However, when using this scheme, I seem to be leaking memory, my assumption is those are pings that never get answered.
Does the HttpClient have a (configurable) request timeout? Is the callback called with an error if the timeout runs out?
I guess the more memory conscious way is to have a single callback for all responses looking at the response source (I think httpResponse has the ip.address) and mark those systems alive.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I use HttpClient::downloadString to send an api ping to other devices with the callback implemented as a lambda.
Since I send out a number of pings in parallel, the callbacks all use up memory for a time.
However, when using this scheme, I seem to be leaking memory, my assumption is those are pings that never get answered.
Does the HttpClient have a (configurable) request timeout? Is the callback called with an error if the timeout runs out?
I guess the more memory conscious way is to have a single callback for all responses looking at the response source (I think httpResponse has the ip.address) and mark those systems alive.
Beta Was this translation helpful? Give feedback.
All reactions