Skip to content

Commit 204a621

Browse files
committed
update fix
1 parent dcfd501 commit 204a621

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Sources/Exporters/Zipkin/Implementation/ZipkinConversionExtension.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@ struct ZipkinConversionExtension {
4646

4747
var localEndpoint = defaultLocalEndpoint
4848

49-
if let serviceName = attributeEnumerationState.serviceName, !serviceName.isEmpty && !defaultServiceName.elementsEqual(serviceName) {
49+
if let serviceName = attributeEnumerationState.serviceName, !serviceName.isEmpty, defaultServiceName != serviceName {
5050
if localEndpointCache[serviceName] == nil {
51-
localEndpoint = defaultLocalEndpoint.clone(serviceName: serviceName)
52-
localEndpointCache[serviceName] = localEndpoint
53-
} else {
54-
localEndpoint = localEndpointCache[serviceName]
51+
localEndpointCache[serviceName] = defaultLocalEndpoint.clone(serviceName: serviceName)
5552
}
53+
localEndpoint = localEndpointCache[serviceName] ?? localEndpoint
5654
}
5755

5856
if let serviceNamespace = attributeEnumerationState.serviceNamespace, !serviceNamespace.isEmpty {

0 commit comments

Comments
 (0)