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

Method Stop

src/brpc/server.cpp:1286–1302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1284}
1285
1286int Server::Stop(int timeout_ms) {
1287 if (_status != RUNNING) {
1288 return -1;
1289 }
1290 _status = STOPPING;
1291
1292 LOG(INFO) << "Server[" << version() << "] is going to quit";
1293
1294 if (_am) {
1295 _am->StopAccept(timeout_ms);
1296 }
1297 if (_internal_am) {
1298 // TODO: calculate timeout?
1299 _internal_am->StopAccept(timeout_ms);
1300 }
1301 return 0;
1302}
1303
1304// NOTE: Join() can happen before Stop().
1305int Server::Join() {

Callers 15

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
NotifyMethod · 0.45
TearDownMethod · 0.45
TESTFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
StopServerMethod · 0.45
TEST_FFunction · 0.45
TESTFunction · 0.45

Calls 1

StopAcceptMethod · 0.80

Tested by 11

TearDownMethod · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
StopServerMethod · 0.36
TEST_FFunction · 0.36
TESTFunction · 0.36
TearDownMethod · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
StopAndJoinMethod · 0.36