diff options
author | Ilya Etingof <etingof@gmail.com> | 2018-12-29 10:40:01 +0100 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2018-12-29 10:40:01 +0100 |
commit | 920cbcab78f90013465beadbaf7421db1d2c220e (patch) | |
tree | c5be566e7103b3dcb5f271e99def0f938f63e723 /pysnmp/carrier | |
parent | c328f30a8146870e309dc9cb16f1f708246b22a9 (diff) | |
download | pysnmp-git-920cbcab78f90013465beadbaf7421db1d2c220e.tar.gz |
Fix hlapi/v1arch request timeout
The retrying mechanism never worked, apparently.
Diffstat (limited to 'pysnmp/carrier')
-rw-r--r-- | pysnmp/carrier/asyncore/dispatch.py | 3 | ||||
-rw-r--r-- | pysnmp/carrier/base.py | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/pysnmp/carrier/asyncore/dispatch.py b/pysnmp/carrier/asyncore/dispatch.py index a88bd673..4cdd61bf 100644 --- a/pysnmp/carrier/asyncore/dispatch.py +++ b/pysnmp/carrier/asyncore/dispatch.py @@ -16,7 +16,6 @@ from pysnmp.error import PySnmpError class AsyncoreDispatcher(AbstractTransportDispatcher): def __init__(self): self.__sockMap = {} # use own map for MT safety - self.timeout = 0.5 AbstractTransportDispatcher.__init__(self) def getSocketMap(self): @@ -42,7 +41,7 @@ class AsyncoreDispatcher(AbstractTransportDispatcher): def runDispatcher(self, timeout=0.0): while self.jobsArePending() or self.transportsAreWorking(): try: - loop(timeout and timeout or self.timeout, + loop(timeout or self.getTimerResolution(), use_poll=True, map=self.__sockMap, count=1) except KeyboardInterrupt: raise diff --git a/pysnmp/carrier/base.py b/pysnmp/carrier/base.py index aedd42eb..ef6485c0 100644 --- a/pysnmp/carrier/base.py +++ b/pysnmp/carrier/base.py @@ -45,7 +45,7 @@ class AbstractTransportDispatcher(object): self.__recvCallables = {} self.__timerCallables = [] self.__ticks = 0 - self.__timerResolution = 0.5 + self.__timerResolution = 0.1 self.__timerDelta = self.__timerResolution * 0.05 self.__nextTime = 0 self.__routingCbFun = None |