File tree Expand file tree Collapse file tree
core/network/src/commonMain/kotlin/org/meshtastic/core/network/repository Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,7 +113,11 @@ class MQTTRepositoryImpl(
113113 // Using IO-dispatcher since we use blocking MQTTClient.run()
114114 clientJob =
115115 scope.launch(Dispatchers .IO ) {
116- val baseDelay = 2_000L // Base backoff value
116+ @Suppress(" MagicNumber" )
117+ val baseDelay = 2_000L
118+
119+ // Base backoff value
120+ @Suppress(" MagicNumber" )
117121 val maxDelay = 64_000L // Maximal backoff value
118122
119123 // Reconnection loop
@@ -125,6 +129,7 @@ class MQTTRepositoryImpl(
125129 }
126130
127131 // Exponential backoff
132+ @Suppress(" MagicNumber" )
128133 val delayMs =
129134 when {
130135 attempt == 1 -> 0
@@ -139,6 +144,7 @@ class MQTTRepositoryImpl(
139144
140145 // Creating client on each iteration
141146 var newClient: MQTTClient ? = null
147+ @Suppress(" TooGenericExceptionCaught" )
142148 try {
143149 newClient =
144150 MQTTClient (
@@ -255,6 +261,7 @@ class MQTTRepositoryImpl(
255261 }
256262
257263 publishSemaphore.withPermit {
264+ @Suppress(" TooGenericExceptionCaught" )
258265 try {
259266 c.publish(
260267 retain = retained,
You can’t perform that action at this time.
0 commit comments