Skip to content

Commit

Permalink
Ignore stale snapshot messages
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-hofsteede committed Mar 9, 2015
1 parent 34c5418 commit c4bf66d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Mixpanel/MPABTestDesignerSnapshotRequestMessage.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ - (NSOperation *)responseCommandWithConnection:(MPABTestDesignerConnection *)con
// Update the class descriptions in the connection session if provided as part of the message.
if (serializerConfig) {
[connection setSessionObject:serializerConfig forKey:kSnapshotSerializerConfigKey];
} else {
} else if ([connection sessionObjectForKey:kSnapshotSerializerConfigKey]){
// Get the class descriptions from the connection session store.
serializerConfig = [connection sessionObjectForKey:kSnapshotSerializerConfigKey];
} else {
// If neither place has a config, this is probably a stale message and we can't create a snapshot.
return;
}

// Get the object identity provider from the connection's session store or create one if there is none already.
Expand Down

0 comments on commit c4bf66d

Please sign in to comment.