This commit is contained in:
dalbodeule 2024-08-15 19:45:36 +09:00
parent 6cb915a3e1
commit c4db370c91
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65
3 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ fun Routing.wsSongListRoutes() {
when(frame) { when(frame) {
is Frame.Text -> { is Frame.Text -> {
if(frame.readText() == "ping") { if(frame.readText() == "ping") {
send(Frame.Pong(frame.data)) send("pong")
return@webSocket return@webSocket
} }
val data = frame.readText().let { Json.decodeFromString<SongRequest>(it) } val data = frame.readText().let { Json.decodeFromString<SongRequest>(it) }

View File

@ -64,7 +64,7 @@ fun Routing.wsSongRoutes() {
when(frame) { when(frame) {
is Frame.Text -> { is Frame.Text -> {
if(frame.readText() == "ping") { if(frame.readText() == "ping") {
send(Frame.Pong(frame.data)) send("pong")
return@webSocket return@webSocket
} }
} }

View File

@ -64,7 +64,7 @@ fun Routing.wsTimerRoutes() {
when(frame) { when(frame) {
is Frame.Text -> { is Frame.Text -> {
if(frame.readText() == "ping") { if(frame.readText() == "ping") {
send(Frame.Pong(frame.data)) send("pong")
return@webSocket return@webSocket
} }
} }