Subject: | SNMP requests fails without error after timeout. |
Date: | Thu, 5 Jul 2012 14:36:03 +0000 |
To: | "bug-Net-SNMP [...] rt.cpan.org" <bug-Net-SNMP [...] rt.cpan.org> |
From: | Jonas Olsson <Jonas.Olsson [...] metaswitch.com> |
Hello, and thanks for providing this module.
I think I have found a bug/issue:
If a blocking get_request is aborted halfway through the Dispatcher::loop function, in my case caused by a alarm in my code, the $INSTANCE->{_active} flag remains set to TRUE. This in turn means that all following calls to get_request, even from new sessions, instantly return an empty hash without sending any actual requests or raising any errors.
In my code, I check for this behaviour and reset the flag, but this feels like an ugly hack.
It would be nice to have a public method that resets the entire Net::SNMP library to its original state, even if this would mean losing some unsent requests.
I am using perl 5.8.8, and Net:SNMP 6.0.1 (but this issue seems to exist in at least 5.1.0 as well). The code that encountered this problem was running on a Red Hat server, I don't know what version (and it is currently down for maintenance).
Once again, thank you for providing this highly useful module!
Sincerely,
Jonas Olsson