Skip to content

Commit

Permalink
fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Jun 26, 2023
1 parent 7ee56c6 commit 576fb95
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/network/socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1471,17 +1471,8 @@ Socket *make_socket(SocketType type, FdType fd_type, int flags) {
swoole_set_last_error(errno);
return nullptr;
}
int sockfd = swoole::socket(sock_domain, sock_type, 0, flags);
if (sockfd < 0) {
swoole_set_last_error(errno);
return nullptr;
}

auto _socket = swoole::make_socket(sockfd, fd_type);
_socket->nonblock = flags & SW_SOCK_NONBLOCK;
_socket->cloexec = flags & SW_SOCK_CLOEXEC;
_socket->socket_type = type;
return _socket;
return make_socket(type, fd_type, sock_domain, sock_type, 0, flags);
}

Socket *make_socket(SocketType type, FdType fd_type, int sock_domain, int sock_type, int socket_protocol, int flags) {
Expand Down

0 comments on commit 576fb95

Please sign in to comment.