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

Method OnError

library/cpp/neh/http2.cpp:1120–1143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1118 }
1119
1120 void THttpConn::OnError(const TString& errText) {
1121 Finalized_ = true;
1122 if (Connected_) {
1123 Connected_ = false;
1124 TErrorCode ec;
1125 AS_.Shutdown(NAsio::TTcpSocket::ShutdownBoth, ec);
1126 } else {
1127 if (AS_.IsOpen()) {
1128 AS_.AsyncCancel();
1129 }
1130 }
1131 THttpRequestRef r(ReleaseRequest());
1132 if (!!r) {
1133 r->OnError(this, errText);
1134 } else {
1135 if (Cached_) {
1136 size_t res = HttpConnManager()->OnConnError(AddrId_);
1137 Y_UNUSED(res);
1138#ifdef DEBUG_STAT
1139 TDebugStat::ConnDestroyedInCache += res;
1140#endif
1141 }
1142 }
1143 }
1144
1145 void THttpRequest::Run(THttpRequestRef& req) {
1146#ifdef DEBUG_STAT

Callers 2

DoRunMethod · 0.45
OnCancelMethod · 0.45

Calls 7

HttpConnManagerFunction · 0.85
Y_UNUSEDFunction · 0.85
OnConnErrorMethod · 0.80
FinalizeFunction · 0.50
ShutdownMethod · 0.45
IsOpenMethod · 0.45
AsyncCancelMethod · 0.45

Tested by

no test coverage detected