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

fix #244, conn thread use cond to wait for recv thread error. 2.0.47.

This commit is contained in:
winlin 2014-12-03 12:08:29 +08:00
parent 565f29ed6c
commit 787ab674e3
4 changed files with 52 additions and 40 deletions

View file

@ -142,14 +142,22 @@ private:
// the recv thread error code.
int recv_error_code;
SrsRtmpConn* _conn;
// the params for conn callback.
SrsSource* _source;
bool _is_fmle;
bool _is_edge;
// the error timeout cond
// @see https://github.com/winlinvip/simple-rtmp-server/issues/244
st_cond_t error;
public:
SrsPublishRecvThread(SrsRtmpServer* rtmp_sdk, int timeout_ms,
SrsRtmpConn* conn, SrsSource* source, bool is_fmle, bool is_edge);
virtual ~SrsPublishRecvThread();
public:
/**
* wait for error for some timeout.
*/
virtual int wait(int timeout_ms);
virtual int64_t nb_msgs();
virtual int error_code();
public: