react-native-nitro-sse 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -330,4 +330,19 @@ class NitroSse : HybridNitroSseSpec(), DefaultLifecycleObserver {
|
|
|
330
330
|
}
|
|
331
331
|
isFlushPending.set(false)
|
|
332
332
|
}
|
|
333
|
+
|
|
334
|
+
override fun dispose() {
|
|
335
|
+
Log.d(TAG, "Disposing NitroSse instance and cleaning up resources...")
|
|
336
|
+
stop()
|
|
337
|
+
if (hasSubscribedToLifecycle) {
|
|
338
|
+
Handler(Looper.getMainLooper()).post {
|
|
339
|
+
ProcessLifecycleOwner.get().lifecycle.removeObserver(this@NitroSse)
|
|
340
|
+
}
|
|
341
|
+
hasSubscribedToLifecycle = false
|
|
342
|
+
}
|
|
343
|
+
sseHandlerThread?.quitSafely()
|
|
344
|
+
sseHandlerThread = null
|
|
345
|
+
sseHandler = null
|
|
346
|
+
super.dispose()
|
|
347
|
+
}
|
|
333
348
|
}
|
|
@@ -31,7 +31,7 @@ void registerAllNatives() {
|
|
|
31
31
|
using namespace margelo::nitro;
|
|
32
32
|
using namespace margelo::nitro::nitrosse;
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
// Register native JNI methods
|
|
35
35
|
margelo::nitro::nitrosse::JHybridNitroSseSpec::registerNatives();
|
|
36
36
|
margelo::nitro::nitrosse::JFunc_void_std__vector_SseEvent__cxx::registerNatives();
|
|
37
37
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nitro-sse",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "High-performance Server-Sent Events (SSE) for React Native, powered by Nitro Modules.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -84,12 +84,12 @@
|
|
|
84
84
|
"eslint-plugin-prettier": "^5.5.4",
|
|
85
85
|
"jest": "^29.7.0",
|
|
86
86
|
"lefthook": "^2.0.3",
|
|
87
|
-
"nitrogen": "0.34.
|
|
87
|
+
"nitrogen": "0.34.1",
|
|
88
88
|
"prettier": "^2.8.8",
|
|
89
89
|
"react": "19.2.0",
|
|
90
90
|
"react-native": "0.83.0",
|
|
91
91
|
"react-native-builder-bob": "^0.40.17",
|
|
92
|
-
"react-native-nitro-modules": "0.34.
|
|
92
|
+
"react-native-nitro-modules": "0.34.1",
|
|
93
93
|
"release-it": "^19.0.4",
|
|
94
94
|
"turbo": "^2.5.6",
|
|
95
95
|
"typescript": "^5.9.2"
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"react": "*",
|
|
99
99
|
"react-native": "*",
|
|
100
|
-
"react-native-nitro-modules": "0.34.
|
|
100
|
+
"react-native-nitro-modules": "0.34.1"
|
|
101
101
|
},
|
|
102
102
|
"workspaces": [
|
|
103
103
|
"example"
|