RN: Revert Okio.buffer(…) Change from D72632266 (#50669)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50669

Fixes a bug that was introduced while migrating from Java to Kotlin.

Changelog:
[Android][Changed] - Fixed a bug with synchronously fetching resources from Metro.

Reviewed By: cortinico, mdvacca

Differential Revision: D72878362

fbshipit-source-id: feb881fa51f6eaa2cb5c7ba87ac93b7fdc29dc2c
This commit is contained in:
Tim Yung authored and Facebook GitHub Bot committed 2025-04-11 13:32:12 -07:00
1 parent 14fdf3257f
commit d0c8716bfd
1 file changed
+3 -1
@@ -318,7 +318,9 @@ public class DevServerHelper(
if (!response.isSuccessful || response.body() == null) {
return null
}
Okio.sink(outputFile).use { output -> response.body()?.source()?.buffer()?.readAll(output) }
Okio.sink(outputFile).use { output ->
Okio.buffer(response.body()?.source()!!).readAll(output)
}
return outputFile
}
} catch (e: Exception) {