This commit is contained in:
kunfei committed 2022-03-01 23:08:56 +08:00
1 parent 7100940f8d
commit 75b5387297
36 files changed
+214 -152

No files matched your search

@@ -49,7 +49,8 @@ class BookSourceDebugWebSocket(handshakeRequest: NanoHTTPD.IHTTPSession) :
close(NanoWSD.WebSocketFrame.CloseCode.NormalClosure, "调试结束", false)
return@launch
}
val debugBean = GSON.fromJsonObject<Map<String, String>>(message.textPayload)
val debugBean =
GSON.fromJsonObject<Map<String, String>>(message.textPayload).getOrNull()
if (debugBean != null) {
val tag = debugBean["tag"]
val key = debugBean["key"]
@@ -49,7 +49,8 @@ class RssSourceDebugWebSocket(handshakeRequest: NanoHTTPD.IHTTPSession) :
close(NanoWSD.WebSocketFrame.CloseCode.NormalClosure, "调试结束", false)
return@launch
}
val debugBean = GSON.fromJsonObject<Map<String, String>>(message.textPayload)
val debugBean =
GSON.fromJsonObject<Map<String, String>>(message.textPayload).getOrNull()
if (debugBean != null) {
val tag = debugBean["tag"]
if (tag.isNullOrBlank()) {