fix: fix already closed connections on multiindex measurements #525
+14
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On the measurement gatherloop the measurement is marked as non-connected if it becomes unresponsive or the metrica cannot be retrieved for some connectivity reason.
When it happens, the gatherloop tries to reconnect again querying complete sysinfo and resets the snmpclient
This PR tries to fix the logic of the snmpclient inherit from the measurement, as it is using a pointer of a copy instead of the original snmpclient.
In this case, any change on the measurement snmpclient doesn't populates to the multiindex measurement snmpclient, and an already closed connection was being used and the load index is not being done and all the indexes were remain as the last time that they got gethered (wrong if the processed failed at some point)
fix #524