| 90 | } |
| 91 | |
| 92 | void CConnectClientCallback::close_callback() |
| 93 | { |
| 94 | if (client_->is_opened() == false) |
| 95 | { |
| 96 | std::cout << "Id: " << id_ << " connect " |
| 97 | << ctx_->addr << " error: " |
| 98 | << acl_last_serror(); |
| 99 | |
| 100 | // ����ǵ�һ�����Ӿ�ʧ�ܣ����˳� |
| 101 | if (ctx_->nopen_total == 0) |
| 102 | { |
| 103 | std::cout << ", first connect error, quit"; |
| 104 | /* ����첽��������������Ϊ�˳�״̬ */ |
| 105 | client_->get_handle().stop(); |
| 106 | } |
| 107 | std::cout << std::endl; |
| 108 | delete this; |
| 109 | return; |
| 110 | } |
| 111 | |
| 112 | // �����ڴ˴�ɾ���ö�̬����Ļص�������Է�ֹ�ڴ�й¶ |
| 113 | delete this; |
| 114 | } |
| 115 | |
| 116 | bool CConnectClientCallback::timeout_callback() |
| 117 | { |
nothing calls this directly
no test coverage detected