1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Refactor HTTP stream to disconnect client when unpublish

This commit is contained in:
winlin 2019-12-17 16:54:06 +08:00
parent 1e83da7812
commit 191b07668d
7 changed files with 26 additions and 25 deletions

View file

@ -661,7 +661,9 @@ srs_error_t SrsLiveStream::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMess
}
}
return err;
// Here, the entry is disabled by encoder un-publishing or reloading,
// so we must return a io.EOF error to disconnect the client, or the client will never quit.
return srs_error_new(ERROR_HTTP_STREAM_EOF, "Stream EOF");
}
srs_error_t SrsLiveStream::http_hooks_on_play(ISrsHttpMessage* r)