@craft-native/android 0.0.222 → 0.0.223

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@craft-native/android",
3
- "version": "0.0.222",
3
+ "version": "0.0.223",
4
4
  "homepage": "https://github.com/craft-native/craft/tree/main/packages/android#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1093,7 +1093,10 @@ internal object CraftNativeMedia {
1093
1093
  connection.disconnect()
1094
1094
  }
1095
1095
  }.getOrElse { error ->
1096
- CraftNativeCapabilityResult(code = if (error is java.net.SocketTimeoutException) "TIMEOUT" else "NETWORK_ERROR", message = error.message ?: "media.keep failed")
1096
+ val full = generateSequence(error) { it.cause }.take(16).any {
1097
+ it is android.system.ErrnoException && it.errno == android.system.OsConstants.ENOSPC
1098
+ }
1099
+ CraftNativeCapabilityResult(code = if (full) "NO_SPACE" else if (error is java.net.SocketTimeoutException) "TIMEOUT" else "NETWORK_ERROR", message = error.message ?: "media.keep failed")
1097
1100
  }
1098
1101
  val waiting = synchronized(inFlight) { inFlight.remove(address) ?: mutableListOf() }
1099
1102
  main.post { waiting.forEach { it(result) } }