Skip to content

snmp: properly handle SnmpEngine lifetime among threads#125

Merged
vincentbernat merged 1 commit intomasterfrom
fix/snmpengine-leak
Mar 20, 2026
Merged

snmp: properly handle SnmpEngine lifetime among threads#125
vincentbernat merged 1 commit intomasterfrom
fix/snmpengine-leak

Conversation

@vincentbernat
Copy link
Copy Markdown
Owner

pysnmp's AsyncioDispatcher creates a background handle_timeout() task running forever until cancelled. It was leaking with the way Snimpy handled SnmpEngine(). Instead, use one SnmpEngine()/loop by thread and ensure the loop is correctly closed with pening tasks cancelled.

pysnmp's AsyncioDispatcher creates a background handle_timeout() task
running forever until cancelled. It was leaking with the way Snimpy
handled SnmpEngine(). Instead, use one SnmpEngine()/loop by thread and
ensure the loop is correctly closed with pening tasks cancelled.
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 88.6% (-0.06%) from 88.659%
when pulling bdbe03a on fix/snmpengine-leak
into 9f058e9 on master.

@vincentbernat vincentbernat merged commit dc5eef8 into master Mar 20, 2026
7 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