Skip to content

Commit

Permalink
One more place to use asyncio.ensure_future instead of .async. Needs …
Browse files Browse the repository at this point in the history
…Python 3.4.4
  • Loading branch information
jamadden committed Mar 27, 2018
1 parent bf94618 commit e68492a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ZEO/asyncio/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def async_threadsafe(self, method, *args):
def new_connection(loop, addr, socket, zeo_storage, msgpack):
protocol = ServerProtocol(loop, addr, zeo_storage, msgpack)
cr = loop.create_connection((lambda : protocol), sock=socket)
asyncio.async(cr, loop=loop)
asyncio.ensure_future(cr, loop=loop)

class Delay(object):
"""Used to delay response to client for synchronous calls.
Expand Down Expand Up @@ -231,7 +231,7 @@ def __init__(self, storage_server, addr, ssl, msgpack):
else:
cr = loop.create_unix_server(self.factory, addr, ssl=ssl)

f = asyncio.async(cr, loop=loop)
f = asyncio.ensure_future(cr, loop=loop)
server = loop.run_until_complete(f)

self.server = server
Expand Down

0 comments on commit e68492a

Please sign in to comment.