Skip to content

modify windows tcpclient reconnect bug#2662

Merged
julianoes merged 2 commits intomavlink:mainfrom
ytyisme:feature/windows_timeout_reconnect
Oct 1, 2025
Merged

modify windows tcpclient reconnect bug#2662
julianoes merged 2 commits intomavlink:mainfrom
ytyisme:feature/windows_timeout_reconnect

Conversation

@ytyisme
Copy link
Copy Markdown
Contributor

@ytyisme ytyisme commented Sep 25, 2025

Resolves #2661
In Windows, error 10060 will cause socket to reconnect. Add the following code in tcp_client_connection.cpp

inline bool notReady(int err)
{
#ifdef WINDOWS
return err == WSAEWOULDBLOCK || err == WSAETIMEDOUT;
#else
return err == EAGAIN || err == ETIMEDOUT;
#endif
}

@julianoes
Copy link
Copy Markdown
Collaborator

@ytyisme could you fix style please? ./tools/fix_style.sh .

@sonarqubecloud
Copy link
Copy Markdown

@ytyisme
Copy link
Copy Markdown
Contributor Author

ytyisme commented Sep 30, 2025

@ytyisme could you fix style please? ./tools/fix_style.sh .

Sorry, I usually use the Visual Studio compiler.

@julianoes
Copy link
Copy Markdown
Collaborator

The thread sanitizer issue looks unrelated. And I'll copy it out to its own issue.

@julianoes julianoes merged commit cb17782 into mavlink:main Oct 1, 2025
53 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows tcp/udp reconnect

3 participants