Skip to content

Conversation

@alexrsagen
Copy link
Contributor

This PR intends to improve the reliability of ServiceClient, by:

  • Making use of ureq::Agent and its connection pool (leaving the size of the connection pool at the default of 1 connection). This makes ServiceClient able to re-use connections, reducing the amount of lingering TCP connections in TIME_WAIT state in the case that the ZeroTierOne service is not available.
  • Attempting IPv6 connection to localhost if an IPv4 connection to localhost failed, and vice-versa. This is a mostly a work-around for Unable to connect to the ZeroTierOne service HTTP API via IPv4 ZeroTierOne#2342, but could be useful in other (weird) situations. It should not cause any harm.

This avoids always creating new connections, leading to excessive lingering TCP connections in TIME_WAIT state if the ZeroTier system service is unavailable.
@CLAassistant
Copy link

CLAassistant commented Feb 13, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@joseph-henry joseph-henry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this!

@joseph-henry joseph-henry added the bug Something isn't working label Nov 11, 2025
@joseph-henry joseph-henry merged commit 5e80ae3 into zerotier:main Nov 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants