must be called only from asio thread
| 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; |
nothing calls this directly
no test coverage detected