-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
#1300 Problem of fd leakage when pulling non-existent http-flv stream #1304
Conversation
@@ -596,6 +597,7 @@ srs_error_t SrsHttpRecvThread::cycle() | |||
SrsAutoFree(ISrsHttpMessage, req); | |||
|
|||
if ((err = conn->pop_message(&req)) != srs_success) { | |||
trd_err = err; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The err here is shared by trd_err and wrapped err, we should free the trd_err then copy err to it.
First, I will set the
|
Analyze the code and find that it is a low-level coroutine object. After actively exiting, the pull function cannot obtain the error. The upper-level code will start a thread to read messages from the client.
The
And this error code is stored in the return value of the
Usually, when the stop function stops the thread, the return value of the coroutine is obtained so that
In fact, there is no place to call
|
SRS2, SRS3, Origin, and Edge modes all passed the test without any FD leakage issues. Fixed.
|
#1300 Small modification based on #636
TRANS_BY_GPT3