Skip to content

Commit

Permalink
SOCK: Remove duplicate nonblocking code in sim_connect_sock_ex
Browse files Browse the repository at this point in the history
  • Loading branch information
markpizz committed Apr 11, 2020
1 parent 35780cf commit 6af7a8a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions sim_sock.c
Expand Up @@ -688,7 +688,7 @@ return 0;
port = pointer to buffer for IP port (may be NULL), 0 = none
localport
= pointer to buffer for local IP port (may be NULL), 0 = none
result = status (SCPE_OK on complete success or SCPE_ARG if
result = status (0 on complete success or -1 if
parsing can't happen due to bad syntax, a value is
out of range, a result can't fit into a result buffer,
a service name doesn't exist, or a validation name
Expand Down Expand Up @@ -1018,11 +1018,6 @@ if (!(opt_flags & SIM_SOCK_OPT_DATAGRAM)) {
if (sta == -1)
return sim_err_sock (newsock, "setsockopt KEEPALIVE");
}
if (!(opt_flags & SIM_SOCK_OPT_BLOCKING)) {
sta = sim_setnonblock (newsock); /* set nonblocking */
if (sta == SOCKET_ERROR) /* fcntl error? */
return sim_err_sock (newsock, "setnonblock");
}
sta = connect (newsock, result->ai_addr, result->ai_addrlen);
p_freeaddrinfo (result);
if (sta == SOCKET_ERROR) {
Expand Down

0 comments on commit 6af7a8a

Please sign in to comment.