kopia lustrzana https://github.com/ge0rg/aprsdroid
Do not loop-flood 'TNC disconnected'
rodzic
0a97a0c32d
commit
f1d6c08439
|
|
@ -117,12 +117,12 @@ class BluetoothTnc(service : AprsService, prefs : PrefsWrapper) extends AprsBack
|
|||
while (running) {
|
||||
try {
|
||||
if (need_reconnect) {
|
||||
need_reconnect = false
|
||||
log("Reconnecting in 3s...")
|
||||
try {
|
||||
Thread.sleep(3*1000)
|
||||
} catch { case _ => }
|
||||
init_socket()
|
||||
need_reconnect = false
|
||||
service.postLinkOn(R.string.p_link_bt)
|
||||
}
|
||||
Log.d(TAG, "waiting for data...")
|
||||
|
|
|
|||
|
|
@ -141,13 +141,13 @@ class TcpUploader(service : AprsService, prefs : PrefsWrapper) extends AprsBacke
|
|||
while (running) {
|
||||
try {
|
||||
if (need_reconnect) {
|
||||
need_reconnect = false
|
||||
Log.d(TAG, "reconnecting in " + RECONNECT + "s")
|
||||
service.postAddPost(TYPE_INFO, R.string.post_info,
|
||||
service.getString(R.string.post_reconnect, RECONNECT.asInstanceOf[AnyRef]))
|
||||
shutdown()
|
||||
Thread.sleep(RECONNECT*1000)
|
||||
init_socket()
|
||||
need_reconnect = false
|
||||
service.postLinkOn(R.string.p_aprsis_tcp)
|
||||
}
|
||||
Log.d(TAG, "waiting for data...")
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue