Skip to content

Commit

Permalink
Merge pull request #4 from childsish/v1.0.9
Browse files Browse the repository at this point in the history
V1 0 9
  • Loading branch information
childsish authored Sep 26, 2016
2 parents 9d588de + 45de74a commit 39fd6b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion mimo/connection/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async def push(self, item):

async def peek(self):
while self.empty():
if self._closed and len(self._putters) == 0:
if self.is_closed():
raise ConnectionClosed

getter = self._loop.create_future()
Expand Down Expand Up @@ -71,3 +71,9 @@ def close(self):
getter.set_exception(ConnectionClosed)
else:
getter.set_result(None)

def is_closed(self):
return self._closed and len(self._queue) == 0 and len(self._putters) == 0

def is_open(self):
return not self.is_closed()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='mimo',
version='1.0.8',
version='1.0.9',
author='Liam H. Childs',
author_email='[email protected]',
packages=find_packages(exclude=['tests']),
Expand Down

0 comments on commit 39fd6b6

Please sign in to comment.