diff --git a/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/CoreUpdater.kt b/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/CoreUpdater.kt index 1672234c2..a6ec7b4bd 100644 --- a/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/CoreUpdater.kt +++ b/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/CoreUpdater.kt @@ -38,8 +38,11 @@ internal object CoreUpdater { println("Updating shadowed-core from V$current -> V$newest, this is a force update") this.getProtocolLib()?.delete() MiraiDownloader - .addTask("https://pan.jasonczc.cn/?/mirai/mirai-core-qqandroid/mirai-core-qqandroid-$newest.mp4",getContent("mirai-core-qqandroid-jvm-$newest.jar")) - //.addTask("https://raw.githubusercontent.com/mamoe/mirai-repo/master/shadow/mirai-core-qqandroid/mirai-core-qqandroid-$newest.jar", getContent("mirai-core-qqandroid-jvm-$newest.jar")) + .addTask( + "https://pan.jasonczc.cn/?/mirai/mirai-core-qqandroid/mirai-core-qqandroid-$newest.mp4", + getContent("mirai-core-qqandroid-jvm-$newest.jar") + ) + //.addTask("https://raw.githubusercontent.com/mamoe/mirai-repo/master/shadow/mirai-core-qqandroid/mirai-core-qqandroid-$newest.jar", getContent("mirai-core-qqandroid-jvm-$newest.jar")) } } @@ -54,7 +57,7 @@ internal object CoreUpdater { url { protocol = URLProtocol.HTTPS host = "jcenter.bintray.com" - path("net/mamoe/mirai-core-qqandroid-jvm/") + path("net/mamoe/mirai-core-qqandroid/") } }).asSequence() .map { it.value.drop(1).dropLast(1) } @@ -85,7 +88,6 @@ internal object CoreUpdater { } - /* private suspend fun downloadCore(version: String) { /** diff --git a/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/WrapperMain.kt b/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/WrapperMain.kt index a8eebc40a..0a453290d 100644 --- a/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/WrapperMain.kt +++ b/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/WrapperMain.kt @@ -197,8 +197,8 @@ private object WrapperProperties { private fun gc() { GlobalScope.launch { - while (true) { - delay(1000 * 60 * 5) + while (isActive) { + delay(1000 * 60) System.gc() } }