Skip to content

Commit 7232394

Browse files
committed
简单优化/修复变量引用
1 parent f75de77 commit 7232394

File tree

1 file changed

+4
-4
lines changed
  • simbot-component-onebot-v11/simbot-component-onebot-v11-core/src/commonMain/kotlin/love/forte/simbot/component/onebot/v11/core/bot/internal

1 file changed

+4
-4
lines changed

simbot-component-onebot-v11/simbot-component-onebot-v11-core/src/commonMain/kotlin/love/forte/simbot/component/onebot/v11/core/bot/internal/OneBotBotImpl.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,14 @@ internal class OneBotBotImpl(
321321

322322
while (session == null && retryTimes <= connectMaxRetryTimes) {
323323
try {
324-
logger.debug("Connect to ws server {}", eventServerHost)
324+
logger.debug("Connect to ws server {}", wsHost)
325325
session = createSession()
326326
} catch (e: Exception) {
327327
retryTimes++
328328

329329
@Suppress("ConvertTwoComparisonsToRangeCheck")
330330
if (connectMaxRetryTimes > 0 && retryTimes > connectMaxRetryTimes) {
331-
"Connect to ws server $eventServerHost failed in $retryTimes times.".also { msg ->
331+
"Connect to ws server $wsHost failed in $retryTimes times.".also { msg ->
332332
val ex = IllegalStateException(msg)
333333
sessionJob.completeExceptionally(ex)
334334

@@ -339,7 +339,7 @@ internal class OneBotBotImpl(
339339
if (logger.isWarnEnabled()) {
340340
logger.warn(
341341
"Connect to ws server {} failed: {}, retry in {}...",
342-
eventServerHost,
342+
wsHost,
343343
e.message,
344344
connectRetryDelay.toString(),
345345
e,
@@ -386,7 +386,7 @@ internal class OneBotBotImpl(
386386

387387
if (currentSession == null) return
388388

389-
logger.debug("Connected to ws server {}, session: {}", eventServerHost, currentSession)
389+
logger.debug("Connected to ws server {}, session: {}", wsHost, currentSession)
390390

391391
this@WsEventSession.session = currentSession
392392

0 commit comments

Comments
 (0)