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

Refine SrsTcpClient timeout in time unit

This commit is contained in:
winlin 2019-04-17 07:56:28 +08:00
parent e9770933a6
commit 61afca7160
10 changed files with 46 additions and 23 deletions

View file

@ -75,7 +75,7 @@ using namespace std;
#define SRS_PAUSED_RECV_TMMS (3 * SRS_UTIME_MINUTES)
// when edge timeout, retry next.
#define SRS_EDGE_TOKEN_TRAVERSE_TMMS (3000)
#define SRS_EDGE_TOKEN_TRAVERSE_TIMEOUT (3 * SRS_UTIME_SECONDS)
SrsSimpleRtmpClient::SrsSimpleRtmpClient(string u, int64_t ctm, int64_t stm) : SrsBasicRtmpClient(u, ctm, stm)
{
@ -1159,7 +1159,7 @@ srs_error_t SrsRtmpConn::check_edge_token_traverse_auth()
int port = SRS_CONSTS_RTMP_DEFAULT_PORT;
srs_parse_hostport(hostport, server, port);
SrsTcpClient* transport = new SrsTcpClient(server, port, SRS_EDGE_TOKEN_TRAVERSE_TMMS);
SrsTcpClient* transport = new SrsTcpClient(server, port, SRS_EDGE_TOKEN_TRAVERSE_TIMEOUT);
SrsAutoFree(SrsTcpClient, transport);
if ((err = transport->connect()) != srs_success) {