Subject: | Could TIMEOUT_MINIMUM be less than 1.0s? |
Date: | Mon, 23 Feb 2009 17:46:09 +0000 |
To: | bug-net-snmp [...] rt.cpan.org |
From: | Andy Buchanan <andy [...] nowwireless.com> |
Message body is not shown because sender requested not to inline it.
Dear Net::SNMP maintainers,
Thank you for your very useful module. I am using it via
POE::Component::SNMP.
I am just wondering why there is a minimum limit of 1.0s on the timeout in
Net::SNMP::Transport. I have a program which is sending a SNMP request once
every second, and when the device is unreachable, and a timeout is occuring,
the overheads in POE are causing a time-leak which makes the responses come
back later and later (about 2ms in each second).
I was contemplating writing a workaround using additional alarms, but
thought I would look through the Net::SNMP code and see if this problem
could be fixed at source. I made the following change and it seems to have
resolved my problem:
### Net/SNMP/Transport.pm.patch ###
80c80
< sub TIMEOUT_MINIMUM() { 1.0 }
---
Show quoted text
> sub TIMEOUT_MINIMUM() { 0.1 }
Would you consider implementing this patch in the main distribution? There
doesn't seem to be any issue with it and it seems to work as expected, with
sub-second timeouts happening fine. I have attached my test code.
Regards,
--
Andy Buchanan