Tim H
Tim H
## Issue If [`index.search(query)`](https://github.com/fluentpython/example-code-2e/blob/master/21-async/mojifinder/tcp_mojifinder.py#L45) in `tcp_mojifinder.py` returns empty result, it crashes TCP because [`asyncio.StreamWriter.writelines(data)`](https://docs.python.org/3/library/asyncio-stream.html#asyncio.StreamWriter.writelines) raises `AssertionError: Data should not be empty` error if `data` is an empty iterable. ### How...
Fixes #61 Start the TCP server ```shell % ./tcp_mojifinder.py Building index. Serving on ('127.0.0.1', 2323). Hit CTRL-C to stop. ``` Connect to the TCP server and send a search query...