MCPcopy Create free account
hub / github.com/acl-dev/acl / close_callback

Method close_callback

lib_acl_cpp/src/connpool/check_client.cpp:53–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void check_client::close_callback()
54{
55 struct timeval end;
56 gettimeofday(&end, NULL);
57 double cost = stamp_sub(end, begin_);
58
59 if (timedout_) {
60 logger_warn("server: %s dead, timeout, spent: %.2f ms",
61 addr_.c_str(), cost);
62 timer_.get_monitor().on_timeout(addr_.c_str(), cost);
63 } else if (!aliving_) {
64 logger_warn("server: %s dead, spent: %.2f ms",
65 addr_.c_str(), cost);
66 timer_.get_monitor().on_refused(addr_.c_str(), cost);
67 }
68 //else
69 // logger("server: %s alive, spent: %.2f ms",
70 // addr_.c_str(), spent);
71
72 // ���ڴ˴��ĺô��DZ�֤�˵�ǰ���϶����ڹرչ����У�ͬʱ����������
73 // �� timer_ ��ɾ���Լ��� timer_ �м�����ĸ���
74 timer_.get_monitor().get_manager().set_pools_status(addr_, aliving_);
75 timer_.remove_client(addr_, this);
76
77 delete this;
78}
79
80bool check_client::timeout_callback()
81{

Callers

nothing calls this directly

Calls 6

on_timeoutMethod · 0.80
set_pools_statusMethod · 0.80
remove_clientMethod · 0.80
gettimeofdayFunction · 0.50
stamp_subFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected