hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Unexpected traceback from get_pushes function

Open Lukasa opened this issue 10 years ago • 1 comments

See:

>>> c = hyper.HTTPConnection('178.62.118.18')
>>> c.request('GET', '/')
>>> r = c.get_response()
>>> for push in c.get_pushes(capture_all=True):
...     print push.path
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ubuntu/env/local/lib/python2.7/site-packages/hyper/http20/connection.py", line 207, in get_pushes
    for promised_stream_id, headers in stream.get_pushes(capture_all):
AttributeError: 'NoneType' object has no attribute 'get_pushes'

Looks like the stream is going AWOL.

Lukasa avatar Aug 26 '15 12:08 Lukasa

So, I think we need to improve our handling of expiring streams: if they have unconsumed pushes on them we should terminate those pushes. We should then also update the docs to clarify that get_pushes should be used before reading the end of the stream.

Lukasa avatar Aug 31 '15 10:08 Lukasa