brpc icon indicating copy to clipboard operation
brpc copied to clipboard

controller->ErrorCode cannot set over 256?

Open zuoerfeng opened this issue 5 years ago • 1 comments

Describe the bug (描述bug) if controller->SetFailed(brpc::ERPCTIMEDOUT, "rpc call timeout"); but controller->ErrorCode() != brpc::ERPCTIMEDOUT?

check it , it maybe overflow? ErrorCode cannot > 256

To Reproduce (复现方法) controller->SetFailed(brpc::ERPCTIMEDOUT, "rpc call timeout"); EXPECT_EQ(240, controller.ErrorCode());

Expected behavior (期望行为) controller->SetFailed(brpc::ERPCTIMEDOUT, "rpc call timeout"); EXPECT_EQ(brpc::ERPCTIMEDOUT, controller.ErrorCode());

Versions (各种版本) OS: centos6.5 Compiler:gcc482 brpc: 0.9.7 protobuf:2.5.0

Additional context/screenshots (更多上下文/截图) image image

zuoerfeng avatar Nov 04 '21 09:11 zuoerfeng

测试了一下,master并没有这个问题

wwbmmm avatar Nov 25 '22 06:11 wwbmmm