Open 72squared opened 8 years ago
So I think this occurs when the connection has been closed while a read was queued up. We should probably raise ConnectionResetError
in this case.
👍
Did this get resolved?
Depends what you mean by resolved. We haven't started raising a better error yet.
Well this AttributeError shouldn't appear though. So in a way it was resolved ;)
I've seen this error crop up while talking to APNS, which seems to be SUPER AGGRESSIVE about prematurely terminating connections. Generally, I see it pop when trying to read response headers. I just wrap the parent call to trap for (HTTP20Error, AttributeError) which fixes this.
Someone could just wrap https://github.com/Lukasa/hyper/blob/development/hyper/http20/stream.py#L228 and that would probably catch most of these.
Was this bug closed via https://github.com/Lukasa/hyper/commit/4d9262444b43b7b76cf649d853fc04b834d63545 ?
It's certainly possible. Try with the current master and see if you can reproduce.
I see this error very intermittently (1 in a million requests?) while using apns2 package:
https://github.com/Pr0Ger/PyAPNs2/tree/master/apns2
Here's the traceback:
It is using the 0.6.2 hyper release. I haven't compared against using older versions of hyper.