From 2e620485d598f63143e0605bd961f2525d25d111 Mon Sep 17 00:00:00 2001 From: pauldb09 <70904183+pauldb09@users.noreply.github.com> Date: Mon, 27 Feb 2023 22:16:10 +0100 Subject: [PATCH] minor: Debug & WS --- .../src/main/java/lavalink/server/io/SocketServer.kt | 3 ++- .../src/main/java/lavalink/server/io/WebSocketHandler.kt | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/LavalinkServer/src/main/java/lavalink/server/io/SocketServer.kt b/LavalinkServer/src/main/java/lavalink/server/io/SocketServer.kt index c3225bcfa..6560fa74b 100644 --- a/LavalinkServer/src/main/java/lavalink/server/io/SocketServer.kt +++ b/LavalinkServer/src/main/java/lavalink/server/io/SocketServer.kt @@ -182,8 +182,9 @@ class SocketServer( val context = contextMap[session.attributes["sessionId"]] ?: throw IllegalStateException("No context for session ID ${session.id}. Broken websocket?") - context.eventEmitter.onWebsocketMessageIn(message.payload) context.wsHandler.handle(json) + log.info("it's been transfered") + } internal fun onSessionResumeTimeout(context: SocketContext) { diff --git a/LavalinkServer/src/main/java/lavalink/server/io/WebSocketHandler.kt b/LavalinkServer/src/main/java/lavalink/server/io/WebSocketHandler.kt index 232e63172..97ef4874d 100644 --- a/LavalinkServer/src/main/java/lavalink/server/io/WebSocketHandler.kt +++ b/LavalinkServer/src/main/java/lavalink/server/io/WebSocketHandler.kt @@ -50,11 +50,8 @@ class WebSocketHandler( private val disabledFilters = serverConfig.filters.entries.filter { !it.value }.map { it.key } fun handle(json: JSONObject) { - if (!loggedWsCommandsDeprecationWarning) { - log.warn("Sending websocket commands to Lavalink has been deprecated and will be removed in API version 4. API version 3 will be removed in Lavalink 5. Please use the new REST endpoints instead.") - loggedWsCommandsDeprecationWarning = true - } val op = json.getString("op") + log.info("hnadling on op until here") val handler = handlers[op] ?: return log.warn("Unknown op '$op'") handler(json) }