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

Method OnResponse

library/cpp/neh/tcp2.cpp:444–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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));

Callers 1

OnReceiveMessageMethod · 0.45

Calls 3

ErrorDescriptionMethod · 0.80
NotifyResponseMethod · 0.45
NotifyErrorMethod · 0.45

Tested by

no test coverage detected