Created
February 11, 2026 19:59
-
-
Save LethalMaus/4c17d4d672429766839a338f82d1df0b to your computer and use it in GitHub Desktop.
ZeroMq.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override fun close() { | |
| try { | |
| isRunning = false | |
| receiveJob?.cancel() | |
| subSocket?.close() | |
| pubSocket?.close() | |
| context?.close() | |
| Log.d(TAG, "Disconnected from server") | |
| CoroutineScope(Dispatchers.Main).launch { onConnectionChanged?.invoke(false) } | |
| } catch (e: Exception) { | |
| Log.e(TAG, "Error disconnecting from server: ${e.message}", e) | |
| } finally { | |
| receiveJob = null | |
| subSocket = null | |
| pubSocket = null | |
| context = null | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment