Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #301 from honzasp/master
Browse files Browse the repository at this point in the history
Use call_soon() when closing in conn._read_data()
  • Loading branch information
popravich authored Oct 9, 2017
2 parents 059c74f + 12da31a commit 4b2d4ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aioredis/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def _read_data(self):
if self._in_transaction is not None:
self._transaction_error = exc
self._closing = True
self._do_close(exc)
self._loop.call_soon(self._do_close, exc)
return
except Exception as exc:
# XXX: for QUIT command connection error can be received
Expand All @@ -193,7 +193,7 @@ def _read_data(self):
self._process_data(obj)

self._closing = True
self._do_close(None)
self._loop.call_soon(self._do_close, None)

def _process_data(self, obj):
"""Processes command results."""
Expand Down

0 comments on commit 4b2d4ec

Please sign in to comment.