Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Fix issue where invoke would be called more than once during cp call #408

Merged
merged 1 commit into from
Jun 22, 2017

Conversation

maxpowa
Copy link
Contributor

@maxpowa maxpowa commented Jun 21, 2017

Current code raises a java.lang.RuntimeException: Illegal callback invocation from native module. This callback type only permits a single invocation from native code. when cp errors but successfully closes its streams.

In the case where there was an exception during copy, cp would call invoke twice -- once for the exception and then again in the finally block when the streams are closed.

@wkh237 wkh237 merged commit 6782949 into wkh237:0.11.0 Jun 22, 2017
@GustavoHGS
Copy link

When will this version (0.11.0) with the fix be available for usage at master?

fiznool added a commit to studiozeffa/rn-fetch-blob that referenced this pull request Aug 15, 2018
Fixes a case where `callback` was called twice when something went wrong in the `cp` operation, leading to a `java.lang.RuntimeException: Illegal callback invocation from native module. This callback type only permits a single invocation from native code.`

This is the same fix [as seen in the original repo](wkh237#408).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants