kopia lustrzana https://github.com/Yakifo/amqtt
Corrected memory leak of task refs in client deliver_message on timeout causing client_tasks to grow forever, in plugin/manager causing _fired_events to grow forever
rodzic
f81de68aed
commit
138313a3eb
|
|
@ -358,6 +358,7 @@ class MQTTClient:
|
|||
else:
|
||||
#timeout occured before message received
|
||||
deliver_task.cancel()
|
||||
self.client_tasks.pop()
|
||||
raise asyncio.TimeoutError
|
||||
|
||||
@asyncio.coroutine
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ class PluginManager:
|
|||
|
||||
def clean_fired_events(future):
|
||||
try:
|
||||
self._fired_events.remove(task)
|
||||
self._fired_events.remove(future)
|
||||
except (KeyError, ValueError):
|
||||
pass
|
||||
|
||||
|
|
@ -149,6 +149,7 @@ class PluginManager:
|
|||
if wait:
|
||||
if tasks:
|
||||
yield from asyncio.wait(tasks, loop=self._loop)
|
||||
self.logger.debug("Plugins len(_fired_events)=%d" % (len(self._fired_events)))
|
||||
|
||||
@asyncio.coroutine
|
||||
def map(self, coro, *args, **kwargs):
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue