diff options
author | Ilya Etingof <etingof@gmail.com> | 2019-03-31 11:19:43 +0200 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2019-03-31 11:19:43 +0200 |
commit | 1de1055b2335d41ed46f9a6da3741aa4424adae4 (patch) | |
tree | 277c8e823107511778e2f0bd2669d4e90c4e23c4 | |
parent | 531ccbcf782d65faaf0b88159ff1c5941d220c9b (diff) | |
download | pysnmp-git-1de1055b2335d41ed46f9a6da3741aa4424adae4.tar.gz |
Respect timer resolution in asyncore main loop
Fixes asyncore main loop upper bound timeout to respect
currently set timer resolution.
-rw-r--r-- | CHANGES.txt | 4 | ||||
-rw-r--r-- | pysnmp/carrier/asyncore/dispatch.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 52555257..24e490e0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,8 +1,8 @@ -Revision 4.4.10, released 2019-02-XX +Revision 4.4.10, released 2019-04-XX ------------------------------------ -No changes yet +- Respect non-default timer resolution in asyncore main loop Revision 4.4.9, released 2019-02-09 ----------------------------------- diff --git a/pysnmp/carrier/asyncore/dispatch.py b/pysnmp/carrier/asyncore/dispatch.py index bc72df91..c271387b 100644 --- a/pysnmp/carrier/asyncore/dispatch.py +++ b/pysnmp/carrier/asyncore/dispatch.py @@ -42,7 +42,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 |