This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Description
We're using hyper in a long running script, opening a single connection and re-using it. So far we've encountered two problems with that, though it looks like both are a manifestation of the same thing, the connection being closed by the remote end. I don't think this is something hyper can/should handle itself, but maybe it should raise more obvious errors (that are also easier to catch).
The first issue we had was HTTP20Connection._sock becoming None, making HTTP20Connection.get_response fail with AttributeError: 'NoneType' object has no attribute 'recv'. Our solution for now is to simply wrap our request/response code in try/except and re-establishing the connection on error.
The second one we get is SSLError: ('The read operation timed out',) again in HTTP20Connection.get_response. This could just be a networking issue and not a connection being closed, but we're not sure.
If anyone knows some tricks using hyper in very long running scripts, I'd love to hear them.