mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 11:41:44 +08:00
完善http超时管理
This commit is contained in:
@@ -35,7 +35,7 @@ HttpClient::HttpClient(){
|
||||
}
|
||||
HttpClient::~HttpClient(){
|
||||
}
|
||||
void HttpClient::sendRequest(const string &strUrl){
|
||||
void HttpClient::sendRequest(const string &strUrl,float fTimeOutSec){
|
||||
auto protocol = FindField(strUrl.data(), NULL , "://");
|
||||
uint16_t defaultPort;
|
||||
bool isHttps;
|
||||
@@ -84,7 +84,7 @@ void HttpClient::sendRequest(const string &strUrl){
|
||||
|
||||
if(!alive() || bChanged){
|
||||
//InfoL << "reconnet:" << _lastHost;
|
||||
startConnect(host, port);
|
||||
startConnect(host, port,fTimeOutSec);
|
||||
}else{
|
||||
SockException ex;
|
||||
onConnect(ex);
|
||||
|
||||
Reference in New Issue
Block a user