|
|
@ -12,6 +12,7 @@ import org.openrs2.cache.VersionTrailer |
|
|
|
import org.openrs2.protocol.js5.Js5Request |
|
|
|
import org.openrs2.protocol.js5.Js5Request |
|
|
|
import org.openrs2.protocol.js5.Js5Response |
|
|
|
import org.openrs2.protocol.js5.Js5Response |
|
|
|
import org.openrs2.util.collect.UniqueQueue |
|
|
|
import org.openrs2.util.collect.UniqueQueue |
|
|
|
|
|
|
|
import java.io.FileNotFoundException |
|
|
|
import javax.inject.Inject |
|
|
|
import javax.inject.Inject |
|
|
|
import javax.inject.Singleton |
|
|
|
import javax.inject.Singleton |
|
|
|
|
|
|
|
|
|
|
@ -66,6 +67,7 @@ public class Js5Service @Inject constructor( |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
try { |
|
|
|
store.read(request.archive, request.group).use { buf -> |
|
|
|
store.read(request.archive, request.group).use { buf -> |
|
|
|
if (request.archive != Js5Archive.ARCHIVESET) { |
|
|
|
if (request.archive != Js5Archive.ARCHIVESET) { |
|
|
|
VersionTrailer.strip(buf) |
|
|
|
VersionTrailer.strip(buf) |
|
|
@ -73,6 +75,10 @@ public class Js5Service @Inject constructor( |
|
|
|
|
|
|
|
|
|
|
|
buf.retain() |
|
|
|
buf.retain() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} catch (ex: FileNotFoundException) { |
|
|
|
|
|
|
|
ctx.close() |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
val response = Js5Response(request.prefetch, request.archive, request.group, buf) |
|
|
|
val response = Js5Response(request.prefetch, request.archive, request.group, buf) |
|
|
|