Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reset self.defer at start rather than on end
The discovery phase of an SNMPv3 transaction may cause a timeout to be generated from the call to snmp_send. This would cause the loop in the `TableRetriever.fetchSomeMore()` to exit early, which results in `self.defer` being reset to `None` before it is returned to the caller in `TableRetriever.__call__()`. This results in the caller not receiving a proper `Deferred` object to attach callbacks to, while the `SnmpTimeoutError` will be logged as an unhandled exception in a Deferred by the Twisted reactor. This patch resets `self.defer` to a new value at the start of `__call__()` instead, and never resets it back to `None`, in order for the caller to always receive a proper Deferred instance.
- Loading branch information