Working on redirect/connect/etc
This commit is contained in:
@@ -121,14 +121,7 @@ public:
|
||||
client->async_diff_ = true;
|
||||
|
||||
// Process the invocation in the master model.
|
||||
//
|
||||
// An invoke with the wrong actor_id is quietly a noop. This is
|
||||
// to make leeway for clients who have recently been redirected, and
|
||||
// who may not know their new actor_id yet.
|
||||
//
|
||||
if (inv.actor() == client->actor_id_) {
|
||||
world_->invoke(client->client_id_, inv);
|
||||
}
|
||||
world_->invoke(client->client_id_, inv);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -235,6 +228,13 @@ public:
|
||||
while (handle_invocation(client));
|
||||
if (client == nullptr) continue;
|
||||
|
||||
// Check for force disconnect.
|
||||
int64_t actor_id = world_->connection_get_actor(client->client_id_);
|
||||
if (actor_id == 0) {
|
||||
delete_client(client);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Possibly send a diff.
|
||||
// Currently, it's configured to send about
|
||||
// ten mini-diffs per second, and two full diffs
|
||||
|
||||
Reference in New Issue
Block a user