Skip to content

Commit

Permalink
Always yield Server.handle_comm coroutine (#2559)
Browse files Browse the repository at this point in the history
Without this change, I see the following when running [this](https://github.com/TomAugspurger/dask-perf/blob/master/bench_comm.py)
comm benchmark.

```
(ucx-dev) an.taugspurger@dgx05:~/ucx-dev-env/dask-perf$ python bench_comm.py
/home/nfs/an.taugspurger/ucx-dev-env/distributed/distributed/comm/tcp.py:436: RuntimeWarning: coroutine 'server_handle_comm' was never awaited
  self.comm_handler(comm)
```
  • Loading branch information
TomAugspurger authored and mrocklin committed Mar 11, 2019
1 parent 8e843cd commit fb30c33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions distributed/comm/tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from .addressing import parse_host_port, unparse_host_port
from .core import Comm, Connector, Listener, CommClosedError, FatalCommClosedError
from .utils import (to_frames, from_frames,
get_tcp_server_address, ensure_concrete_host)
get_tcp_server_address, ensure_concrete_host,)


logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -433,7 +433,7 @@ def _handle_stream(self, stream, address):
address, self.contact_address)
local_address = self.prefix + get_stream_address(stream)
comm = self.comm_class(stream, local_address, address, self.deserialize)
self.comm_handler(comm)
yield self.comm_handler(comm)

def get_host_port(self):
"""
Expand Down

0 comments on commit fb30c33

Please sign in to comment.