palantir / python-jsonrpc-server

A Python 2 and 3 asynchronous JSON RPC server
MIT License
83 stars 36 forks source link

Don't throw if rfile is closed #28

Closed jroitgrund closed 4 years ago

jroitgrund commented 4 years ago

Ideally listen() should exit gracefully when the stream is closed. The current loop condition isn't enough to ensure that though, because most of the time listen() will be blocked on self._rfile.readline().