From 0f45b14f63aca986db9c6eb07bbdfd9822114991 Mon Sep 17 00:00:00 2001 From: zhulongjun Date: Sat, 13 Jul 2019 12:58:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=97=A0=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a8/tcpsession.cc | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) 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 } } -