change the return code to OB_SERVER_LISTEN_ERROR when sql nio listen failed

This commit is contained in:
obdev
2022-12-16 07:15:12 +00:00
committed by ob-robot
parent 68f3d56bb7
commit 505c1b5bd0
3 changed files with 21 additions and 21 deletions

View File

@ -589,8 +589,8 @@ public:
ret = OB_IO_ERROR;
LOG_WARN("epoll_create fail", K(ret), K(errno));
} else if ((lfd_ = listen_create(port)) < 0) {
ret = OB_IO_ERROR;
LOG_WARN("listen create fail", K(port), K(errno));
ret = OB_SERVER_LISTEN_ERROR;
LOG_WARN("listen create fail", K(ret), K(port), K(errno), KERRNOMSG(errno));
} else if (0 != epoll_regist(epfd_, lfd_, epflag, NULL)) {
ret = OB_IO_ERROR;
LOG_WARN("regist listen fd fail", K(ret));
@ -684,11 +684,11 @@ private:
bool need_destroy = false;
if (false == s->handler_close_been_called()) {
if (false == s->get_may_handling_flag()) {
LOG_WARN("can close safely, do destroy", K(*s));
LOG_INFO("can close safely, do destroy", K(*s));
need_destroy = true;
} else {
if (s->wait_handling()) {
LOG_WARN("sock ref clean, do destroy", K(*s));
LOG_INFO("sock ref clean, do destroy", K(*s));
need_destroy = true;
} else {
LOG_WARN("wait handling done...", K(*s));