mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-05-02 07:34:25 +02:00
Should not crash app when StateSync fails to bind.
This commit is contained in:
parent
4066ce73a8
commit
7c9e9d5f52
@ -112,6 +112,7 @@ class StateSync {
|
||||
Logger.i(TAG, "Sync key pair initialized (public key = ${publicKey})")
|
||||
|
||||
_thread = Thread {
|
||||
try {
|
||||
val serverSocket = ServerSocket(PORT)
|
||||
_serverSocket = serverSocket
|
||||
|
||||
@ -125,6 +126,10 @@ class StateSync {
|
||||
|
||||
session.startAsResponder()
|
||||
}
|
||||
} catch (e: Throwable) {
|
||||
Logger.e(TAG, "Failed to bind server socket to port ${PORT}", e)
|
||||
UIDialogs.toast("Failed to start sync, port in use")
|
||||
}
|
||||
}.apply { start() }
|
||||
|
||||
if (Settings.instance.synchronization.connectLast) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user