Commit f6e82dc6 authored by wangyao02's avatar wangyao02

- set errno when get_sock_opt fail

parent b2fdd4d5
......@@ -1387,8 +1387,8 @@ int Controller::get_sock_opt(int level, int optname, void* optval, socklen_t* op
if (s) {
return getsockopt(s->fd(), level, optname, optval, optlen);
} else {
LOG(WARNING) << "sock is null";
return EINVAL;
errno = EBADF;
return -1;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment