mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 15:33:12 +09:00
Reject an upload for a player who is back, and take an empty reply as stored
A player rejoining before the controller's reply was skipped by reject_upload, and the join then kept the copy the controller refused. The rejection now counts while the join still waits for its acquire reply, which the controller sends after it. A controller from before the upload response replies with nothing. That failed validation on a newer host, so its uploads were never confirmed. It is taken as stored, as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JyNnVzRW4jPWaoWTxCyhM7
This commit is contained in:
1 parent
b6bc118297
commit
a959ff25a4
3 files changed
+18
-4
No files matched your search
@@ -269,12 +269,13 @@ export class UploadResponse {
|
||||
) {
|
||||
}
|
||||
|
||||
static jsonSchema = Type.Object({
|
||||
"stored": Type.Boolean(),
|
||||
// No type: a controller from before this response replies with nothing, which counts as stored
|
||||
static jsonSchema = Type.Unsafe<{ stored: boolean } | undefined>({
|
||||
properties: { "stored": { type: "boolean" } },
|
||||
});
|
||||
|
||||
static fromJSON(json: Static<typeof UploadResponse.jsonSchema>) {
|
||||
return new this(json.stored);
|
||||
return new this(json?.stored ?? true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user