Skip to content

Commit db0d94e

Browse files
[CAS] Fix the async error handling for makeGlobal()
When makeGlobal failed, it accidentally callbacks the async function twice with the second time being success case. rdar://147955776
1 parent 8cbf26f commit db0d94e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/SwiftDriver/SwiftScan/SwiftScanCAS.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ public final class CachedCompilation {
5959
} else {
6060
obj.callback(DependencyScanningError.casError("unknown makeGlobal error"))
6161
}
62+
} else {
63+
obj.callback(nil)
6264
}
63-
obj.callback(nil)
6465
}
6566

6667
let context = CallbackContext(self, callback)

0 commit comments

Comments
 (0)