mirror of https://github.com/usbharu/Hideout.git
Merge pull request #290 from usbharu/bugfix/failed-to-fetch-nodeinfo
nodeinfoの取得に失敗する問題を修正
This commit is contained in:
commit
74f0426e54
|
@ -43,7 +43,7 @@ class KtorResourceResolveService(
|
||||||
protected suspend fun runResolve(url: String): ResolveResponse {
|
protected suspend fun runResolve(url: String): ResolveResponse {
|
||||||
val httpResponse = httpClient.get(url)
|
val httpResponse = httpClient.get(url)
|
||||||
val contentLength = httpResponse.contentLength()
|
val contentLength = httpResponse.contentLength()
|
||||||
if ((contentLength ?: sizeLimit) >= sizeLimit) {
|
if ((contentLength ?: 0) >= sizeLimit) {
|
||||||
throw RemoteMediaFileSizeException("File size is too large. $contentLength >= $sizeLimit")
|
throw RemoteMediaFileSizeException("File size is too large. $contentLength >= $sizeLimit")
|
||||||
}
|
}
|
||||||
return KtorResolveResponse(httpResponse)
|
return KtorResolveResponse(httpResponse)
|
||||||
|
|
Loading…
Reference in New Issue