mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-08 23:08:20 +00:00
debugs... 4
This commit is contained in:
parent
c14fc53dee
commit
4fca9df9c2
@ -57,6 +57,9 @@ fun Routing.wsSongListRoutes() {
|
||||
for (frame in ws.incoming) {
|
||||
if (frame is Text) {
|
||||
val message = frame.readText()
|
||||
if(message == "ping") {
|
||||
return true
|
||||
}
|
||||
val data = Json.decodeFromString<SongRequest>(message)
|
||||
if (data.type == SongType.ACK.value) {
|
||||
return true // ACK received
|
||||
|
@ -98,7 +98,7 @@ fun Routing.wsSongRoutes() {
|
||||
for (frame in incoming) {
|
||||
when(frame) {
|
||||
is Frame.Text -> {
|
||||
if(frame.readText() == "ping") {
|
||||
if(frame.readText().trim() == "ping") {
|
||||
send("pong")
|
||||
}
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ fun Routing.wsTimerRoutes() {
|
||||
for (frame in incoming) {
|
||||
when(frame) {
|
||||
is Frame.Text -> {
|
||||
if(frame.readText() == "ping") {
|
||||
if(frame.readText().trim() == "ping") {
|
||||
send("pong")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user