MCPcopy Create free account
hub / github.com/catboost/catboost / Run

Method Run

library/cpp/neh/http2.cpp:1145–1172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1143 }
1144
1145 void THttpRequest::Run(THttpRequestRef& req) {
1146#ifdef DEBUG_STAT
1147 if ((++TDebugStat::RequestTotal & 0xFFF) == 0) {
1148 TDebugStat::Print();
1149 }
1150#endif
1151 try {
1152 while (!Canceled_) {
1153 THttpConnRef conn;
1154 if (HttpConnManager()->Get(conn, Addr_->Id)) {
1155 DBGOUT("Use connection from cache");
1156 Conn_ = conn; //thread magic
1157 if (!conn->StartNextRequest(req)) {
1158 continue; //if use connection from cache, ignore write error and try another conn
1159 }
1160 } else {
1161 HttpConnManager()->CheckLimits(); //here throw exception if reach hard limit (or atexit() state)
1162 Conn_ = THttpConn::Create(HttpConnManager()->GetIOService());
1163 TEndpoint ep(new NAddr::TAddrInfo(&*AddrIter_));
1164 Conn_->StartRequest(req, ep, Addr_->Id, THttp2Options::SymptomSlowConnect); // can throw
1165 }
1166 break;
1167 }
1168 } catch (...) {
1169 Conn_.Reset();
1170 throw;
1171 }
1172 }
1173
1174 //it seems we have lost TCP SYN packet, create extra connection for decrease response time
1175 void THttpRequest::OnDetectSlowConnecting() {

Callers 6

TThreadedResolverMethod · 0.45
RunMethod · 0.45
THttpConnManagerMethod · 0.45
LoopMethod · 0.45
TLoopFuncMethod · 0.45
TExecThreadMethod · 0.45

Calls 8

HttpConnManagerFunction · 0.85
StartNextRequestMethod · 0.80
CheckLimitsMethod · 0.80
StartRequestMethod · 0.80
PrintFunction · 0.50
CreateFunction · 0.50
GetMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected