Make sure traceUrl is null before detecting agent url
This commit is contained in:
parent
e044567617
commit
f0a11d4aff
|
@ -291,6 +291,7 @@ public class DDAgentApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void detectEndpoint() {
|
private synchronized void detectEndpoint() {
|
||||||
|
if (tracesUrl == null) {
|
||||||
final HttpUrl v4Url = getUrl(host, port, TRACES_ENDPOINT_V4);
|
final HttpUrl v4Url = getUrl(host, port, TRACES_ENDPOINT_V4);
|
||||||
if (endpointAvailable(v4Url, unixDomainSocketPath, true)) {
|
if (endpointAvailable(v4Url, unixDomainSocketPath, true)) {
|
||||||
tracesUrl = v4Url;
|
tracesUrl = v4Url;
|
||||||
|
@ -299,6 +300,7 @@ public class DDAgentApi {
|
||||||
tracesUrl = getUrl(host, port, TRACES_ENDPOINT_V3);
|
tracesUrl = getUrl(host, port, TRACES_ENDPOINT_V3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|
Loading…
Reference in New Issue