joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.8k stars 767 forks source link

fix(android): prevent NPE when writing with stream #858

Closed artyorsh closed 1 month ago

artyorsh commented 7 months ago

When writing with a stream, sometimes you might want to close the stream, which will happen asynchronously with write operations. A good example of running into this issue is a logger implementation which continuously writes logs to a file. This prevents throwing NPE when logging to not-open streams by try-catching the potential error and informing JS runtime instead.

artyorsh commented 7 months ago

@rpenfold tagging you as the main reviewer of a few last pull requests