Skip to content

Commit

Permalink
Fixed abort error on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
geroale committed Apr 5, 2023
1 parent 7321d6b commit bf84d46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ios/Downloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ class Downloader: NSObject, URLSessionDownloadDelegate {

func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
if error != nil {
if (self.stopTask) {
rejectCallback!("err", "Download aborted", error)
return
}

rejectCallback!("err", "Cannot write on file", error)
return
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-chunked-dl",
"version": "0.2.0",
"version": "0.2.1",
"description": "test",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down

0 comments on commit bf84d46

Please sign in to comment.