Skip to content

Commit f0d6907

Browse files
committed
Try passing seeds to Random
1 parent 1152f5f commit f0d6907

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frameworks/Kotlin/vertx-web-kotlinx/with-db/common/src/main/kotlin/CommonWithDbVerticle.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ abstract class CommonWithDbVerticle<DbClient : Any, Transaction> : CommonVerticl
6565
CommonWithDbVerticleI<DbClient, Transaction> {
6666
private lateinit var _dbClient: DbClient
6767
val dbClient: DbClient get() = _dbClient
68-
override val random = Random(0)
68+
override val random = Random(
69+
System.currentTimeMillis() xor System.nanoTime() xor
70+
this.hashCode().toLong() xor
71+
Thread.currentThread().threadId()
72+
)
6973

7074
override suspend fun start() {
7175
_dbClient = initDbClient()

0 commit comments

Comments
 (0)