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

@ -220,7 +220,7 @@ srs_error_t SrsHttpClient::connect()
return err;
}
transport = new SrsTcpClient(host, port, timeout);
transport = new SrsTcpClient(host, port, srs_utime_t(timeout * SRS_UTIME_MILLISECONDS));
if ((err = transport->connect()) != srs_success) {
disconnect();
return srs_error_wrap(err, "http: tcp connect %s:%d to=%d", host.c_str(), port, (int)timeout);