diff --git a/src/main/kotlin/mdnet/base/Application.kt b/src/main/kotlin/mdnet/base/Application.kt index a5e771f..7f5c0b6 100644 --- a/src/main/kotlin/mdnet/base/Application.kt +++ b/src/main/kotlin/mdnet/base/Application.kt @@ -186,7 +186,6 @@ fun getServer(cache: DiskLruCache, serverSettings: ServerSettings, clientSetting editor.abort() } } - mdResponse.close() respondWithImage(tee, contentLength, contentType, lastModified) } else { editor?.abort() @@ -194,9 +193,9 @@ fun getServer(cache: DiskLruCache, serverSettings: ServerSettings, clientSetting if (LOGGER.isTraceEnabled) { LOGGER.trace("Request for $sanitizedUri is being served") } - mdResponse.close() respondWithImage(mdResponse.body.stream, contentLength, contentType, lastModified) } + mdResponse.close() } } }