Skip to content

Commit

Permalink
Merge 8a13237 into 25ab2ba
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquito committed Oct 24, 2018
2 parents 25ab2ba + 8a13237 commit 9869795
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
4.3.0
-----

* Fix #112

4.2.0
-----

Expand Down
12 changes: 11 additions & 1 deletion aio_pika/pika/adapters/base_connection.py
Expand Up @@ -422,7 +422,7 @@ def _handle_write(self):
try:
while self.outbound_buffer:
frame = self.outbound_buffer.popleft()
while True:
while self.socket:
try:
bw = self.socket.send(frame)
break
Expand All @@ -431,6 +431,12 @@ def _handle_write(self):
continue
else:
raise
else:
if self.is_open:
raise _SOCKET_ERROR(
errno.ECONNABORTED,
errno.errorcode[errno.ECONNABORTED]
)

bytes_written += bw
if bw < len(frame):
Expand Down Expand Up @@ -471,6 +477,10 @@ def _manage_event_state(self):
write.
"""

if not self.socket:
return

if self.outbound_buffer:
if not self.event_state & self.WRITE:
self.event_state |= self.WRITE
Expand Down
2 changes: 1 addition & 1 deletion aio_pika/version.py
Expand Up @@ -7,7 +7,7 @@

team_email = 'me@mosquito.su'

version_info = (4, 2, 0)
version_info = (4, 3, 0)

__author__ = ", ".join("{} <{}>".format(*info) for info in author_info)
__version__ = ".".join(map(str, version_info))

0 comments on commit 9869795

Please sign in to comment.