mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +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) {
|
for (frame in ws.incoming) {
|
||||||
if (frame is Text) {
|
if (frame is Text) {
|
||||||
val message = frame.readText()
|
val message = frame.readText()
|
||||||
|
if(message == "ping") {
|
||||||
|
return true
|
||||||
|
}
|
||||||
val data = Json.decodeFromString<SongRequest>(message)
|
val data = Json.decodeFromString<SongRequest>(message)
|
||||||
if (data.type == SongType.ACK.value) {
|
if (data.type == SongType.ACK.value) {
|
||||||
return true // ACK received
|
return true // ACK received
|
||||||
|
@ -98,7 +98,7 @@ fun Routing.wsSongRoutes() {
|
|||||||
for (frame in incoming) {
|
for (frame in incoming) {
|
||||||
when(frame) {
|
when(frame) {
|
||||||
is Frame.Text -> {
|
is Frame.Text -> {
|
||||||
if(frame.readText() == "ping") {
|
if(frame.readText().trim() == "ping") {
|
||||||
send("pong")
|
send("pong")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ fun Routing.wsTimerRoutes() {
|
|||||||
for (frame in incoming) {
|
for (frame in incoming) {
|
||||||
when(frame) {
|
when(frame) {
|
||||||
is Frame.Text -> {
|
is Frame.Text -> {
|
||||||
if(frame.readText() == "ping") {
|
if(frame.readText().trim() == "ping") {
|
||||||
send("pong")
|
send("pong")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user