Skip to content

Commit 46c8adc

Browse files
authored
Release lock after context value has been removed (#446)
1 parent ff57bcc commit 46c8adc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/OpenTelemetryApi/Context/ActivityContextManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ class ActivityContextManager: ContextManager {
7474
if contextMap[activityIdent]?.isEmpty ?? false {
7575
contextMap[activityIdent] = nil
7676
}
77-
rlock.unlock()
7877
if let scope = objectScope.object(forKey: value) {
7978
var scope = scope.scope
8079
os_activity_scope_leave(&scope)
8180
objectScope.removeObject(forKey: value)
8281
}
82+
rlock.unlock()
8383
}
8484
}

0 commit comments

Comments
 (0)