python-hyper / hyper

HTTP/2 for Python.
http://hyper.rtfd.org/en/latest/
MIT License
1.05k stars 192 forks source link

Check HTTP11 socket is initialized before closing #326

Closed obrown closed 7 years ago

obrown commented 7 years ago

Ensures that the underlying socket exists before calling close on it. This allows us to exit a context safely if connect() hasn't been called

It also matches the behaviour in HTTP20Connection.