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

Commit 219216d

Browse files
committed
Release event listener after request is canceled
1 parent a48842f commit 219216d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ function fetch(...args:any):Promise {
161161
}
162162
promise.cancel = (fn) => {
163163
fn = fn || function(){}
164+
subscription.remove()
165+
subscriptionUpload.remove()
164166
RNFetchBlob.cancelRequest(taskId, fn)
165167
}
166168

0 commit comments

Comments
 (0)