移除无用代码

This commit is contained in:
zhulongjun 2019-07-13 12:58:47 +08:00
parent 238bb8599f
commit 0f45b14f63

View File

@ -74,7 +74,6 @@ namespace a8
memmove(p->buff, buff, bufflen); memmove(p->buff, buff, bufflen);
p->bufflen = bufflen; p->bufflen = bufflen;
send_buffer_mutex_.lock(); send_buffer_mutex_.lock();
#if 1
if (bot_node_) { if (bot_node_) {
bot_node_->next = p; bot_node_->next = p;
bot_node_ = p; bot_node_ = p;
@ -85,50 +84,6 @@ namespace a8
if (!sending_) { if (!sending_) {
NotifyEpollSend(); 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(); send_buffer_mutex_.unlock();
++master->send_node_num; ++master->send_node_num;
} }
@ -410,4 +365,3 @@ namespace a8
} }
} }