python-trio / purerpc

Native, async Python gRPC client and server implementation supporting asyncio, uvloop, and trio
Apache License 2.0
217 stars 15 forks source link

fix Sever handling of end-of-stream condition #34

Closed belm0 closed 2 years ago

belm0 commented 2 years ago

anyio 2.x changed from returning empty data to raising EndOfStream. Prior to the anyio upgrade, no tests raised an exception the server main loop, while after there were many instances of EndOfStream and BrokenResourceError.

Also fix apparent bug in server connection handler, where the wrong socket might be used.

agronholm commented 2 years ago

I can review this once the test suite passes.

belm0 commented 2 years ago

the new test is failing on Trio-- the behavior must be different somehow