Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/OpenCPN/OpenCPN
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakansv committed Aug 7, 2023
2 parents 1151978 + 20a781e commit 82ceec9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions libs/easywsclient/easywsclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,17 @@ socket_t hostname_connect(const std::string& hostname, int port) {
{
sockfd = socket(p->ai_family, p->ai_socktype, p->ai_protocol);

#ifndef _WIN32
// We cannot use select() on sockets with fd >= 1024.
if (sockfd > 500){
closesocket(sockfd);
sockfd = INVALID_SOCKET;
#ifdef _WIN32
Sleep(5000);
#else
sleep(5);
#endif
freeaddrinfo(result);
return sockfd;
}

#endif

if (sockfd == INVALID_SOCKET) { continue; }

#ifdef _WIN32
Expand Down

0 comments on commit 82ceec9

Please sign in to comment.