react-native-nitro-sse 2.2.1 → 2.2.2
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.
|
@@ -215,7 +215,7 @@ class NitroSse : HybridNitroSseSpec(), DefaultLifecycleObserver {
|
|
|
215
215
|
} else {
|
|
216
216
|
start()
|
|
217
217
|
}
|
|
218
|
-
} else if (isRunning.get()) {
|
|
218
|
+
} else if (isRunning.get() && lastNetworkCapabilities != null) {
|
|
219
219
|
// Check if interface changed (e.g. WiFi -> Cellular)
|
|
220
220
|
val isWifi = capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)
|
|
221
221
|
val isCellular = capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)
|
|
@@ -784,8 +784,8 @@ class NitroSse : HybridNitroSseSpec(), DefaultLifecycleObserver {
|
|
|
784
784
|
private fun performInternalCleanup() {
|
|
785
785
|
// Runs on sseHandler thread
|
|
786
786
|
flushBufferToJs()
|
|
787
|
+
sseHandler?.removeCallbacks(flushRunnable)
|
|
787
788
|
backoffCounter = 0
|
|
788
|
-
sseHandler?.removeCallbacksAndMessages(null)
|
|
789
789
|
eventSource?.cancel()
|
|
790
790
|
eventSource = null
|
|
791
791
|
requestId?.let {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nitro-sse",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
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",
|