Don't hold ._updates_lock while calling .handlers

This commit is contained in:
Lonami Exo 2017-09-18 11:01:15 +02:00
parent 143e046cf5
commit 0235fce99c

View File

@ -77,9 +77,10 @@ class UpdateState:
self._state = update
elif not hasattr(update, 'pts') or update.pts > self._state.pts:
self._state.pts = getattr(update, 'pts', self._state.pts)
for handler in self.handlers:
handler(update)
if self._polling:
self._updates.append(update)
self._updates_available.set()
for handler in self.handlers:
handler(update)