Skip to content

Commit

Permalink
Fixing socket state when DNS resolution failed. (#437)
Browse files Browse the repository at this point in the history
Ports 37ce4d9 into lts_02_2020.
  • Loading branch information
ewertons committed Nov 19, 2020
1 parent 21a8ae9 commit d8a246e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion adapters/socketio_berkeley.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ static int initiate_socket_connection(SOCKET_IO_INSTANCE* socket_io_instance)
}
else
{
// Async connect will return -1.
result = 0;
if (socket_io_instance->on_io_open_complete != NULL)
{
socket_io_instance->on_io_open_complete(socket_io_instance->on_io_open_complete_context, IO_OPEN_OK /*: IO_OPEN_ERROR*/);
Expand All @@ -372,7 +374,7 @@ static int lookup_address_and_initiate_socket_connection(SOCKET_IO_INSTANCE* soc
{
if (result == 0)
{
initiate_socket_connection(socket_io_instance);
result = initiate_socket_connection(socket_io_instance);
}
}

Expand Down

0 comments on commit d8a246e

Please sign in to comment.