Skip to content

Commit 27ff643

Browse files
feat(WSClient): print the close reason when disconnected from WS
1 parent d17572b commit 27ff643

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/gg/skytils/skytilsws/client/WSClient.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ object WSClient {
9191
e.printStackTrace()
9292
closeExceptionally(e)
9393
} finally {
94-
if (mc.theWorld != null) UChat.chat("${Skytils.failPrefix} §cConnection to SkytilsWS lost")
94+
if (mc.theWorld != null) {
95+
UChat.chat("${Skytils.failPrefix} §cConnection to SkytilsWS lost (reason: ${closeReason.await()})")
96+
}
9597
session = null
9698
}
9799
}

0 commit comments

Comments
 (0)