Skip to content

Commit

Permalink
Fix socket connect errno
Browse files Browse the repository at this point in the history
  • Loading branch information
beef9999 committed Dec 5, 2023
1 parent 3ae9e95 commit e1e0cae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/basic_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ int connect(int fd, const struct sockaddr *addr, socklen_t addrlen,
ret = getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &n);
if (ret < 0) return -1;
if (err) {
errno = err;
errno = e;
return -1;
}
return 0;
Expand Down

0 comments on commit e1e0cae

Please sign in to comment.