Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close stream request once we end up with proxy #9110

Merged
merged 4 commits into from
Aug 26, 2017

Conversation

foxel
Copy link
Contributor

@foxel foxel commented Aug 24, 2017

Description:

Related issue (if applicable): fixes #9108

This closes connection to mjpeg stream once WEB user ends watching the stream in UI

@mention-bot
Copy link

@foxel, thanks for your PR! By analyzing the history of the files in this pull request, we identified @pvizeli, @balloob and @Danielhiversen to be potential reviewers.

@@ -93,6 +93,8 @@ def async_aiohttp_proxy_web(hass, request, web_coro, buffer_size=102400,
yield from async_aiohttp_proxy_stream(hass, request, req.content,
req.headers.get(CONTENT_TYPE))

req.close()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use:

try:
   yield from async_aiohttp_proxy...
finally:
  req.close()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@foxel foxel requested a review from a team as a code owner August 26, 2017 15:21
try:
yield from async_aiohttp_proxy_stream(
hass,
request,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

req.headers.get(CONTENT_TYPE))
try:
yield from async_aiohttp_proxy_stream(
hass,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

@balloob balloob added this to the 0.52.1 milestone Aug 26, 2017
@balloob balloob merged commit c537770 into home-assistant:dev Aug 26, 2017
@balloob
Copy link
Member

balloob commented Aug 26, 2017

Thanks! 🎉 🐬

balloob pushed a commit that referenced this pull request Aug 28, 2017
* Close stream request once we end up with proxy

* Update aiohttp_client.py

* Update aiohttp_client.py

* Removed trailing whitespace
@balloob balloob mentioned this pull request Aug 28, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Dec 11, 2017
@foxel foxel deleted the patch-1 branch November 14, 2019 14:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generic MJPEG Camera does not close connections
7 participants