Skip to content

Commit

Permalink
fixup! Add hook to override socket creation for hosted sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
tomc797 committed Oct 24, 2024
1 parent be26d1d commit 85efa68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ziti-tunnel-cbs/ziti_hosting.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ static int do_udp_connect(hosted_io_context io, const struct addrinfo *remote_ad
if (uv_err < 0 && uv_err != UV_ENOSYS)
return uv_err;

if ((uv_err = uv_udp_open(&io->server.udp, sock)) < 0) {
if (uv_err == 0 && (uv_err = uv_udp_open(&io->server.udp, sock)) < 0) {
(void) closesocket(sock);
return uv_err;
}
Expand Down

0 comments on commit 85efa68

Please sign in to comment.