正在显示
2 个修改的文件
包含
5 行增加
和
1 行删除
@@ -869,7 +869,7 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd) | @@ -869,7 +869,7 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd) | ||
869 | pprint->elapse(); | 869 | pprint->elapse(); |
870 | 870 | ||
871 | // cond wait for error. | 871 | // cond wait for error. |
872 | - trd->wait(SRS_CONSTS_RTMP_RECV_TIMEOUT_US / 1000); | 872 | + trd->wait(SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US / 1000); |
873 | 873 | ||
874 | // check the thread error code. | 874 | // check the thread error code. |
875 | if ((ret = trd->error_code()) != ERROR_SUCCESS) { | 875 | if ((ret = trd->error_code()) != ERROR_SUCCESS) { |
@@ -74,6 +74,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -74,6 +74,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
74 | // the timeout to wait client data, | 74 | // the timeout to wait client data, |
75 | // if timeout, close the connection. | 75 | // if timeout, close the connection. |
76 | #define SRS_CONSTS_RTMP_RECV_TIMEOUT_US (int64_t)(30*1000*1000LL) | 76 | #define SRS_CONSTS_RTMP_RECV_TIMEOUT_US (int64_t)(30*1000*1000LL) |
77 | +// the timeout for publish recv. | ||
78 | +// we must use more smaller timeout, for the recv never know the status | ||
79 | +// of underlayer socket. | ||
80 | +#define SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US (int64_t)(3*1000*1000LL) | ||
77 | 81 | ||
78 | // the timeout to wait for client control message, | 82 | // the timeout to wait for client control message, |
79 | // if timeout, we generally ignore and send the data to client, | 83 | // if timeout, we generally ignore and send the data to client, |
-
请 注册 或 登录 后发表评论