Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Jun 26, 2023
1 parent 0609615 commit 7ee56c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/coroutine/socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ bool Socket::http_proxy_handshake() {
return ret;
}

void Socket::init_sock_type(SocketType _sw_type) {
type = _sw_type;
network::Socket::get_domain_and_type(_sw_type, &sock_domain, &sock_type);
void Socket::init_sock_type(SocketType _type) {
type = _type;
network::Socket::get_domain_and_type(_type, &sock_domain, &sock_type);
}

bool Socket::init_sock() {
Expand Down
4 changes: 2 additions & 2 deletions src/network/socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1492,8 +1492,8 @@ Socket *make_socket(SocketType type, FdType fd_type, int sock_domain, int sock_t
}

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

0 comments on commit 7ee56c6

Please sign in to comment.