Notifies relay failures after marking them as closed.
This commit is contained in:
@@ -233,6 +233,10 @@ class Relay(
|
|||||||
// checks if this is an actual failure. Closing the socket generates an onFailure as well.
|
// checks if this is an actual failure. Closing the socket generates an onFailure as well.
|
||||||
if (!(socket == null && (t.message == "Socket is closed" || t.message == "Socket closed"))) {
|
if (!(socket == null && (t.message == "Socket is closed" || t.message == "Socket closed"))) {
|
||||||
RelayStats.newError(url, response?.message ?: t.message)
|
RelayStats.newError(url, response?.message ?: t.message)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Failures disconnect the relay.
|
||||||
|
markConnectionAsClosed()
|
||||||
|
|
||||||
Log.w("Relay", "Relay onFailure $url, ${response?.message} $response ${t.message} $socket")
|
Log.w("Relay", "Relay onFailure $url, ${response?.message} $response ${t.message} $socket")
|
||||||
t.printStackTrace()
|
t.printStackTrace()
|
||||||
@@ -244,10 +248,6 @@ class Relay(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Failures disconnect the relay.
|
|
||||||
markConnectionAsClosed()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun markConnectionAsReady(
|
fun markConnectionAsReady(
|
||||||
|
|||||||
Reference in New Issue
Block a user