Skip to content

Commit a429aab

Browse files
committed
shutdowninternal should not return error
1 parent 32985b5 commit a429aab

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

android/src/main/java/land/fx/fula/FulaModule.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,8 +1197,7 @@ private void shutdownInternal() throws Exception {
11971197

11981198
}
11991199
} catch (Exception e) {
1200-
Log.d("ReactNative", "shutdownInternal"+ e.getMessage());
1201-
throw (e);
1200+
Log.d("ReactNative", "shutdownInternal error: "+ e.getMessage());
12021201
}
12031202
}
12041203

ios/Fula.swift

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,12 +1220,18 @@ class FulaModule: NSObject {
12201220

12211221
}
12221222

1223-
func shutdownInternal() throws {
1223+
func shutdownInternal() {
12241224
NSLog("ReactNative shutdownInternal")
1225-
if(self.fula != nil) {
1225+
if self.fula != nil {
12261226
NSLog("ReactNative shutdownInternal fula is not null")
1227-
try self.fula?.shutdown()
1228-
NSLog("ReactNative shutdownInternal fula.shutdown called")
1227+
do {
1228+
try self.fula?.shutdown()
1229+
NSLog("ReactNative shutdownInternal fula.shutdown called")
1230+
} catch {
1231+
// Handle specific errors if needed or log them
1232+
NSLog("ReactNative shutdownInternal error: \(error.localizedDescription)")
1233+
}
1234+
// Ensure resources are cleaned up regardless of errors
12291235
self.fula = nil
12301236
self.client = nil
12311237
self.wnfs = nil

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@functionland/react-native-fula",
3-
"version": "1.54.29",
3+
"version": "1.54.30",
44
"description": "This package is a bridge to use the Fula libp2p protocols in the react-native which is using wnfs",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

0 commit comments

Comments
 (0)