mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 11:47:24 +01:00
Removing onClosing listener because it isn't being used.
This commit is contained in:
@@ -170,15 +170,6 @@ open class BasicRelayClient(
|
||||
consumeIncomingMessage(text, onConnected)
|
||||
}
|
||||
|
||||
override fun onClosing(
|
||||
code: Int,
|
||||
reason: String,
|
||||
) {
|
||||
Log.w(logTag, "OnClosing $code $reason")
|
||||
|
||||
listener.onRelayStateChange(this@BasicRelayClient, RelayState.DISCONNECTING)
|
||||
}
|
||||
|
||||
override fun onClosed(
|
||||
code: Int,
|
||||
reason: String,
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
*/
|
||||
package com.vitorpamplona.quartz.nip01Core.relay.sockets
|
||||
|
||||
/**
|
||||
* Interface to abstract the socket implementation.
|
||||
* Make sure onMessage appears in order of the receipt.
|
||||
*/
|
||||
interface WebSocketListener {
|
||||
fun onOpen(
|
||||
pingMillis: Int,
|
||||
@@ -28,11 +32,6 @@ interface WebSocketListener {
|
||||
|
||||
fun onMessage(text: String)
|
||||
|
||||
fun onClosing(
|
||||
code: Int,
|
||||
reason: String,
|
||||
)
|
||||
|
||||
fun onClosed(
|
||||
code: Int,
|
||||
reason: String,
|
||||
|
||||
@@ -87,12 +87,6 @@ class BasicOkHttpWebSocket(
|
||||
incomingMessages.trySendBlocking(text)
|
||||
}
|
||||
|
||||
override fun onClosing(
|
||||
webSocket: OkHttpWebSocket,
|
||||
code: Int,
|
||||
reason: String,
|
||||
) = out.onClosing(code, reason)
|
||||
|
||||
override fun onClosed(
|
||||
webSocket: OkHttpWebSocket,
|
||||
code: Int,
|
||||
|
||||
Reference in New Issue
Block a user