| 442 | |
| 443 | public: |
| 444 | void OnResponse(TTcp2Message& msg) { |
| 445 | DBGOUT("TRequest::OnResponse: " << msg.ResponseHeader().Id); |
| 446 | THandleRef h = ReleaseHandler(); |
| 447 | if (!h) { |
| 448 | return; |
| 449 | } |
| 450 | |
| 451 | const TResponseHeader& respHdr = msg.ResponseHeader(); |
| 452 | if (Y_LIKELY(!respHdr.ErrorCode)) { |
| 453 | h->NotifyResponse(msg.Content()); |
| 454 | } else { |
| 455 | h->NotifyError(new TError(respHdr.ErrorDescription(), TError::ProtocolSpecific, respHdr.ErrorCode)); |
| 456 | } |
| 457 | ReleaseConn(); |
| 458 | } |
| 459 | |
| 460 | void OnError(const TString& err, const i32 systemCode = 0) { |
| 461 | DBGOUT("TRequest::OnError: " << Id_.load(std::memory_order_acquire)); |
no test coverage detected