Oops. Repair Dispatcher._process_pooling_updates

This commit is contained in:
Alex Root Junior 2017-08-28 16:08:09 +03:00
parent 77e2d4c44a
commit a5d983a522

View file

@ -188,12 +188,11 @@ class Dispatcher:
:param updates: list of updates.
"""
need_to_call = []
for update in await self.process_updates(updates):
for responses in update:
for response in responses:
if not isinstance(response, BaseResponse):
continue
need_to_call.append(response.execute_response(self.bot))
for response in await self.process_updates(updates):
for response in response:
if not isinstance(response, BaseResponse):
continue
need_to_call.append(response.execute_response(self.bot))
if need_to_call:
try:
asyncio.gather(*need_to_call)