| 183 | } |
| 184 | |
| 185 | void AddResponse(TUdpHttpResponse* resp) override { |
| 186 | TUdpHttpResponsePtr ptr(resp); |
| 187 | |
| 188 | UpdateInFly(); |
| 189 | TInFly::iterator it = InFly_.find(resp->ReqId); |
| 190 | |
| 191 | Y_ABORT_UNLESS(it != InFly_.end(), "incorrect incoming message"); |
| 192 | |
| 193 | TRequestRef& req = it->second; |
| 194 | |
| 195 | if (req->SetNotified()) { |
| 196 | if (resp->Ok == TUdpHttpResponse::OK) { |
| 197 | req->NotifyResponse(TString(resp->Data.data(), resp->Data.size())); |
| 198 | } else { |
| 199 | if (resp->Ok == TUdpHttpResponse::CANCELED) { |
| 200 | req->NotifyError(new TError(resp->Error, TError::Cancelled)); |
| 201 | } else { |
| 202 | req->NotifyError(new TError(resp->Error)); |
| 203 | } |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | InFly_.erase(it); |
| 208 | } |
| 209 | |
| 210 | void AddCancel(const TGUID& guid) override { |
| 211 | UpdateInFly(); |
nothing calls this directly
no test coverage detected