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

How to close a Stream? #399

Open
pedia opened this issue Dec 22, 2023 · 2 comments
Open

How to close a Stream? #399

pedia opened this issue Dec 22, 2023 · 2 comments

Comments

@pedia
Copy link

pedia commented Dec 22, 2023

I found some requests from DLNA devices never closed(We use shelf_static in DLNA(uPNP) serve video files)
Since we cannot change the devices and for security reason and avoide too many open files, I think we should close the Stream by purpose.

So my question is: How to close the Stream in server side?

Response(206, File.openRead(0, xxx))

Thanks

@wengxianxun
Copy link

同样的问题,我设置了mp4链接, dlna视频播放器访问不了

@pedia
Copy link
Author

pedia commented Mar 21, 2024

I don't think your problem is same.

@wangxianxun 我并不认为你的问题和我说的有相关性,"dlna视频播放器访问不了" 可能原因是链接错误,大概率是主机地址不正确,譬如

我的问题是 dlna 播放器 可能未关闭 http connection,导致 File Stream 未关闭。File 也未提供主动关闭接口,所以出现 fd 泄漏。

@pedia pedia changed the title When does connenction of a Range request close? How to close FileStream? Apr 14, 2024
@pedia pedia changed the title How to close FileStream? How to close Stream? Apr 14, 2024
@pedia pedia changed the title How to close Stream? How to close a Stream? Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants