代理视频的异常捕获
This commit is contained in:
parent
565c92ce63
commit
26d525f436
|
|
@ -37,6 +37,7 @@ object ProxyServer {
|
|||
}
|
||||
};
|
||||
httpServer?.addRoutes("/proxy") { req, response ->
|
||||
try {
|
||||
run {
|
||||
val key = req.queryParams["key"];
|
||||
val url = urlMap[key]
|
||||
|
|
@ -46,6 +47,10 @@ object ProxyServer {
|
|||
proxyAsync(url, header, req, response)
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
SpiderDebug.log("代理视频出错:" + e.message)
|
||||
}
|
||||
|
||||
}
|
||||
httpServer?.start()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue