You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
srs/trunk/doc
Winlin 05c3a422a5
HTTP-FLV: Notify connection to expire when unpublishing. v6.0.152 v7.0.11 (#4164)
When stopping the stream, it will wait for the HTTP Streaming to exit.
If the HTTP Streaming goroutine hangs, it will not exit automatically.

```cpp
void SrsHttpStreamServer::http_unmount(SrsRequest* r)
{
    SrsUniquePtr<SrsLiveStream> stream(entry->stream);
    if (stream->entry) stream->entry->enabled = false;
    srs_usleep(...); // Wait for about 120s.
    mux.unhandle(entry->mount, stream.get()); // Free stream.
}

srs_error_t SrsLiveStream::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
{
    err = do_serve_http(w, r); // If stuck in here for 120s+
    alive_viewers_--; // Crash at here, because stream has been deleted.
```

We should notify http stream connection to interrupt(expire):

```cpp
void SrsHttpStreamServer::http_unmount(SrsRequest* r)
{
    SrsUniquePtr<SrsLiveStream> stream(entry->stream);
    if (stream->entry) stream->entry->enabled = false;
    stream->expire(); // Notify http stream to interrupt.
```

Note that we should notify all viewers pulling stream from this http
stream.

Note that we have tried to fix this issue, but only try to wait for all
viewers to quit, without interrupting the viewers, see
https://github.com/ossrs/srs/pull/4144


---------

Co-authored-by: Jacob Su <suzp1984@gmail.com>
5 months ago
..
Architecture.md GB28181: Fix bug for parsing GB to RTC. 2 years ago
CHANGELOG.md HTTP-FLV: Notify connection to expire when unpublishing. v6.0.152 v7.0.11 (#4164) 5 months ago
Dockers.md Use new cache image name. v6.0.86 (#3815) 1 year ago
Features.md WHIP: Support DELETE resource for Larix Broadcaster. v5.0.148 v6.0.36 (#3427) 2 years ago
PERFORMANCE.md Improve README and documents with AI. v5.0.153. v6.0.43 (#3538) 2 years ago
README.md Micro changes and refines. 2 years ago
Resources.md Merge 4.0release, migrate to new website. 3 years ago
ffmpeg-logo.png support ffmpeg filter 11 years ago
ffmpeg-min.png add drawtext filter sample 11 years ago
readme.txt Move doc 5 years ago
source.200kbps.768x320.flv update readme, add hls(audio-only) support to readme. update sample flv from h264+mp3 to h264+aac 11 years ago
source.flv SquashSRS4: Support RTC2RTMP. 4 years ago
srs-logo.ico Windows: Support cygwin pipline and packager. v5.0.89 (#3257) 2 years ago
srs-logo.png remove the libfreetype for it fullfill with bugs and always cause build failed. 0.9.139 11 years ago