移除无用代码
This commit is contained in:
parent
238bb8599f
commit
0f45b14f63
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user