Skip to content

Commit

Permalink
minor: Debug & WS
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldb09 committed Feb 27, 2023
1 parent ac40cd1 commit 2e62048
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 2e62048

Please sign in to comment.