diff --git a/a8/tcpsession.cc b/a8/tcpsession.cc index 210a07f..24fb1fb 100644 --- a/a8/tcpsession.cc +++ b/a8/tcpsession.cc @@ -74,7 +74,6 @@ namespace a8 memmove(p->buff, buff, bufflen); p->bufflen = bufflen; send_buffer_mutex_.lock(); -#if 1 if (bot_node_) { bot_node_->next = p; bot_node_ = p; @@ -85,50 +84,6 @@ namespace a8 if (!sending_) { NotifyEpollSend(); } -#else - if (sending_) { - if (bot_node_) { - bot_node_->next = p; - bot_node_ = p; - } else { - top_node_ = p; - bot_node_ = p; - } - NotifyEpollSend(); - } else { - if (work_node_) { - abort(); - } - if (top_node_ || bot_node_) { - abort(); - } - int ret = DirectSend(p); - switch (ret) { - case 0: - case -2: - { - assert(ret == 0); - if (p->buff) { - free(p->buff); - } - free(p); - } - break; - case -1: - { - if (top_node_ || bot_node_) { - abort(); - } - top_node_ = p; - bot_node_ = p; - NotifyEpollSend(); - } - break; - default: - abort(); - } - } -#endif send_buffer_mutex_.unlock(); ++master->send_node_num; } @@ -410,4 +365,3 @@ namespace a8 } } -