MCPcopy Create free account
hub / github.com/apache/brpc / SetFailed

Method SetFailed

src/brpc/stream.cpp:734–746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

732}
733
734int Stream::SetFailed(StreamId id, int error_code, const char* reason_fmt, ...) {
735 SocketUniquePtr ptr;
736 if (Socket::AddressFailedAsWell(id, &ptr) == -1) {
737 // Don't care recycled stream
738 return 0;
739 }
740 Stream* s = (Stream*)ptr->conn();
741 va_list ap;
742 va_start(ap, reason_fmt);
743 s->Close(error_code, reason_fmt, ap);
744 va_end(ap);
745 return 0;
746}
747
748int Stream::SetFailed(const StreamIds& ids, int error_code, const char* reason_fmt, ...) {
749 va_list ap;

Callers 15

EchoMethod · 0.45
EchoMethod · 0.45
ParseRequestFromIOBufMethod · 0.45
EchoMethod · 0.45
EchoMethod · 0.45
handle_responseFunction · 0.45
default_methodMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls 2

CloseMethod · 0.45
sizeMethod · 0.45

Tested by 15

TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
EchoMethod · 0.36
ProcessRpcRequestMethod · 0.36
TEST_FFunction · 0.36
OnEdgeTriggeredEventsFunction · 0.36
OnInputEventMethod · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TestShutdownWriteFunction · 0.36
MethodMethod · 0.36