mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-19 19:14:51 +00:00
Fixed issue where it would continuously try to connect over relay.
This commit is contained in:
parent
0ef1f2d40f
commit
9347351c37
1 changed files with 1 additions and 3 deletions
|
@ -190,8 +190,6 @@ class StateSync {
|
|||
|
||||
for (connectPair in addressesToConnect) {
|
||||
try {
|
||||
val syncDeviceInfo = SyncDeviceInfo(connectPair.first, arrayOf(connectPair.second), PORT, null)
|
||||
|
||||
val now = System.currentTimeMillis()
|
||||
val lastConnectTime = synchronized(_lastConnectTimesIp) {
|
||||
_lastConnectTimesIp[connectPair.first] ?: 0
|
||||
|
@ -204,7 +202,7 @@ class StateSync {
|
|||
}
|
||||
|
||||
Logger.i(TAG, "Attempting to connect to authorized device by last known IP '${connectPair.first}' with pkey=${connectPair.first}")
|
||||
connect(syncDeviceInfo)
|
||||
connect(arrayOf(connectPair.second), PORT, connectPair.first, null)
|
||||
}
|
||||
} catch (e: Throwable) {
|
||||
Logger.i(TAG, "Failed to connect to " + connectPair.first, e)
|
||||
|
|
Loading…
Add table
Reference in a new issue