Skip to content

Commit f245bf8

Browse files
committed
Detekt and Spotless warnings fix
1 parent 3b3efd8 commit f245bf8

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

core/network/src/commonMain/kotlin/org/meshtastic/core/network/repository/MQTTRepositoryImpl.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)