mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-02 12:50:16 +08:00
Fix StackOverflowError
This commit is contained in:
parent
b5f47d5f91
commit
7e94eb66d4
@ -54,8 +54,9 @@ internal class MockBotBuilder(
|
|||||||
internal fun MockBot(conf: MockBotBuilder.() -> Unit = {}) =
|
internal fun MockBot(conf: MockBotBuilder.() -> Unit = {}) =
|
||||||
MockBotBuilder(MockConfiguration.copy()).apply(conf).run {
|
MockBotBuilder(MockConfiguration.copy()).apply(conf).run {
|
||||||
object : QQAndroidBot(MockAccount, this.conf, debugConf) {
|
object : QQAndroidBot(MockAccount, this.conf, debugConf) {
|
||||||
override val components: ComponentStorage =
|
override val components: ComponentStorage by lazy {
|
||||||
componentsProvider?.invoke(this, this) ?: EMPTY_COMPONENT_STORAGE
|
componentsProvider?.invoke(this, this) ?: EMPTY_COMPONENT_STORAGE
|
||||||
|
}
|
||||||
|
|
||||||
override fun createNetworkHandler(): NetworkHandler =
|
override fun createNetworkHandler(): NetworkHandler =
|
||||||
nhProvider?.invoke(this, this) ?: super.createNetworkHandler()
|
nhProvider?.invoke(this, this) ?: super.createNetworkHandler()
|
||||||
|
Loading…
Reference in New Issue
Block a user