mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix #636, FD leak for requesting empty HTTP stream. 2.0.241
This commit is contained in:
parent
ff87318b95
commit
ae5450181c
7 changed files with 110 additions and 2 deletions
|
@ -390,7 +390,7 @@ private:
|
|||
|
||||
class SrsHttpConn : public SrsConnection
|
||||
{
|
||||
private:
|
||||
protected:
|
||||
SrsHttpParser* parser;
|
||||
ISrsHttpServeMux* http_mux;
|
||||
public:
|
||||
|
@ -421,6 +421,13 @@ class SrsResponseOnlyHttpConn : public SrsHttpConn
|
|||
public:
|
||||
SrsResponseOnlyHttpConn(IConnectionManager* cm, st_netfd_t fd, ISrsHttpServeMux* m);
|
||||
virtual ~SrsResponseOnlyHttpConn();
|
||||
public:
|
||||
// Directly read a HTTP request message.
|
||||
// It's exported for HTTP stream, such as HTTP FLV, only need to write to client when
|
||||
// serving it, but we need to start a thread to read message to detect whether FD is closed.
|
||||
// @see https://github.com/ossrs/srs/issues/636#issuecomment-298208427
|
||||
// @remark Should only used in HTTP-FLV streaming connection.
|
||||
virtual int pop_message(ISrsHttpMessage** preq);
|
||||
public:
|
||||
virtual int on_got_http_message(ISrsHttpMessage* msg);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue