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

Method OnError

library/cpp/neh/tcp2.cpp:963–975  ·  view source on GitHub ↗

must be called only from asio thread

Source from the content-addressed store, hash-verified

961
962 //must be called only from asio thread
963 void OnError(const TString& err, const i32 systemCode = 0) {
964 if (AtomicGet(State_) != Closed) {
965 Error_ = err;
966 SystemCode_ = systemCode;
967 AtomicSet(State_, Closed);
968 AS_.AsyncCancel();
969 }
970 SafeOnError();
971 for (auto& it : ReqsInFly_) {
972 it.second->OnError(err);
973 }
974 ReqsInFly_.clear();
975 }
976
977 void SafeOnError() {
978 TRequest* reqPtr;

Callers

nothing calls this directly

Calls 5

AtomicGetFunction · 0.50
AtomicSetFunction · 0.50
AsyncCancelMethod · 0.45
OnErrorMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected