Re: [Pysnmp-dev] TwistedDispatcher timeout loopingcall
Brought to you by:
elie
From: Ilya E. <il...@gl...> - 2011-06-24 06:33:39
|
That seems like a bug in pysnmp. Will the following patch solve this issue? Please let me know. *** pysnmp/carrier/twisted/dispatch.py 20 Jan 2011 17:11:43 -0000 1.2 --- pysnmp/carrier/twisted/dispatch.py 24 Jun 2011 06:32:03 -0000 *************** *** 52,56 **** self.__transportCount = self.__transportCount - 1 # The last transport has been removed, stop the timeout ! if self.__transportCount > 0 and self.loopingcall.running: self.loopingcall.stop() --- 52,56 ---- self.__transportCount = self.__transportCount - 1 # The last transport has been removed, stop the timeout ! if self.__transportCount == 0 and self.loopingcall.running: self.loopingcall.stop() On Thu, 23 Jun 2011, nver irc wrote: > Hi Ilya, > > Could you please review the stopping condition for > TwistedDispatcher.loopingcall in TwistedDispatcher.unregisterTransport() ? > > # The last transport has been removed, stop the timeout > if self.__transportCount > 0 and self.loopingcall.running: > self.loopingcall.stop() > > It seems that loopingcall.stop() is called while removing one of multiple > transports instead of the last one. > > Best regards, > nver > |