Bimba.git

commit b3b10e3647b0c01572e23e1e4268e52cae039c11

Author: Adam Pioterek <adam.pioterek@protonmail.ch>

Concurrent modification exception

 app/src/main/java/ml/adamsprogs/bimba/datasources/VmClient.kt | 9 +++-


diff --git a/app/src/main/java/ml/adamsprogs/bimba/datasources/VmClient.kt b/app/src/main/java/ml/adamsprogs/bimba/datasources/VmClient.kt
index 7847c18a8bf0194b69f5cec83d6d2bbc24aaf0bf..967f5d281d1f3c35100771deb2504e6d994c9786 100644
--- a/app/src/main/java/ml/adamsprogs/bimba/datasources/VmClient.kt
+++ b/app/src/main/java/ml/adamsprogs/bimba/datasources/VmClient.kt
@@ -33,12 +33,15 @@     private var handler: Handler? = null
     private val tick6ZinaTim: Runnable = object : Runnable {
         override fun run() {
             handler!!.postDelayed(this, TICK_6_ZINA_TIM)
-            for (plateId in requests.keys)
-                downloadVM()
+            try {
+                for (plateId in requests.keys)
+                    downloadVM()
+            } catch (e: ConcurrentModificationException) { //fixme
+            }
         }
     }
     private val requests = HashMap<AgencyAndId, Set<Request>>()
-    private val vms = HashMap<AgencyAndId, Set<Plate>>() //HashSet<Departure>?
+    private val vms = HashMap<AgencyAndId, Set<Plate>>()
     private val timetable = try {
         Timetable.getTimetable(this)
     } catch (e: NullPointerException) {