1
0
Fork 1
mirror of https://gitlab.com/mangadex-pub/mangadex_at_home.git synced 2024-01-19 02:48:37 +00:00

Shifted closing of pool connections better

This commit is contained in:
Amos Ng 2020-06-12 00:55:09 +08:00
parent 25cfc53674
commit 5dbe29c8e9
No known key found for this signature in database
GPG key ID: 89086414F634D123

View file

@ -185,8 +185,8 @@ fun getServer(cache: DiskLruCache, serverSettings: ServerSettings, clientSetting
editor.abort() editor.abort()
} }
mdResponse.close()
} }
mdResponse.close()
respondWithImage(tee, contentLength, contentType, lastModified) respondWithImage(tee, contentLength, contentType, lastModified)
} else { } else {
editor?.abort() editor?.abort()
@ -194,7 +194,7 @@ fun getServer(cache: DiskLruCache, serverSettings: ServerSettings, clientSetting
if (LOGGER.isTraceEnabled) { if (LOGGER.isTraceEnabled) {
LOGGER.trace("Request for $sanitizedUri is being served") LOGGER.trace("Request for $sanitizedUri is being served")
} }
mdResponse.close()
respondWithImage(mdResponse.body.stream, contentLength, contentType, lastModified) respondWithImage(mdResponse.body.stream, contentLength, contentType, lastModified)
} }
} }